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.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/Team team.

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.
 

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.

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

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

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