Eclipse Platform
Release 3.2

org.eclipse.team.core.history
Interface IFileRevision

All Known Implementing Classes:
FileRevision

public interface IFileRevision

Represents an individual revision of a file.

This interface is not intended to be implemented by clients. Clients can instead subclass FileRevision.

Since:
3.2

Method Summary
 boolean exists()
          Returns whether the file represented by this state exists.
 String getAuthor()
          Returns the author of this revision or null if this information is not available.
 String getComment()
          Returns the comment for this file revision or null if this information is not available.
 String getContentIdentifier()
          Returns the unique identifier for this file revision or null if one is not available.
 String getName()
          Returns the name of the file to which this state is associated
 IStorage getStorage(IProgressMonitor monitor)
          Returns the storage for this file revision.
 ITag[] getTags()
          Returns the set of tags available for this file revision.
 long getTimestamp()
          Returns the time stamp of this revision as a long or -1 if the timestamp is unknown.
 URI getURI()
          Returns the URI of the file to which this state is associated or null if the file does not have a URI.
 boolean isPropertyMissing()
          Returns whether this particular file revision has at least one supported property missing.
 IFileRevision withAllProperties(IProgressMonitor monitor)
          Returns an IFileRevision with all supported properties present.
 

Method Detail

getStorage

public IStorage getStorage(IProgressMonitor monitor)
                    throws CoreException
Returns the storage for this file revision. If the returned storage is an instance of IFile clients can assume that this file state represents the current state of the returned IFile.

Parameters:
monitor - a progress monitor
Returns:
IStorage containing file storage
Throws:
CoreException

getName

public String getName()
Returns the name of the file to which this state is associated

Returns:
String containing the name of the file

getURI

public URI getURI()
Returns the URI of the file to which this state is associated or null if the file does not have a URI.

Returns:
URI of the file to which this state is associated

getTimestamp

public long getTimestamp()
Returns the time stamp of this revision as a long or -1 if the timestamp is unknown.

Returns:
a long that represents the time of this revision as the number of milliseconds since the base time
See Also:
System.currentTimeMillis()

exists

public boolean exists()
Returns whether the file represented by this state exists.

Returns:
whether the file represented by this state exists

getContentIdentifier

public String getContentIdentifier()
Returns the unique identifier for this file revision or null if one is not available. If null is returned, clients can use the timestamp to differentiate revisions.

Returns:
the unique identifier for this file revision or null

getAuthor

public String getAuthor()
Returns the author of this revision or null if this information is not available.

Returns:
the author of this revision or null

getComment

public String getComment()
Returns the comment for this file revision or null if this information is not available.

Returns:
the comment for this file revision or null

getTags

public ITag[] getTags()
Returns the set of tags available for this file revision.

Returns:
an array of ITag's if ITags exist for this revision or an empty ITag array if no tags exist

isPropertyMissing

public boolean isPropertyMissing()
Returns whether this particular file revision has at least one supported property missing. If the revision is missing some queries clients can use withAllProperties(IProgressMonitor).

Returns:
whether this particular file revision has at least one supported property missing

withAllProperties

public IFileRevision withAllProperties(IProgressMonitor monitor)
                                throws CoreException
Returns an IFileRevision with all supported properties present.

Parameters:
monitor - a monitor
Returns:
a complete version of this file revision or null
Throws:
CoreException

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.