Package org.eclipse.team.core.history
Interface IFileRevision
- All Known Implementing Classes:
FileRevision
public interface IFileRevision
Represents an individual revision of a file.
- Since:
- 3.2
- Restriction:
- This interface is not intended to be implemented by clients.
Clients can instead subclass
FileRevision
.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Returns whether the file represented by this state exists.Returns the author of this revision ornull
if this information is not available.ITag[]
Returns the branches names of file revision.Returns the comment for this file revision ornull
if this information is not available.Returns the unique identifier for this file revision ornull
if one is not available.getName()
Returns the name of the file to which this state is associatedgetStorage
(IProgressMonitor monitor) Returns the storage for this file revision.ITag[]
getTags()
Returns the set of tags available for this file revision.long
Returns the time stamp of this revision as a long or-1
if the timestamp is unknown.getURI()
Returns the URI of the file to which this state is associated ornull
if the file does not have a URI.boolean
Returns whether this particular file revision has at least one supported property missing.withAllProperties
(IProgressMonitor monitor) Returns anIFileRevision
with all supported properties present.
-
Method Details
-
getStorage
Returns the storage for this file revision. If the returned storage is an instance ofIFile
clients can assume that this file state represents the current state of the returnedIFile
.- Parameters:
monitor
- a progress monitor- Returns:
- IStorage containing file storage
- Throws:
CoreException
- if an error occurs
-
getName
String getName()Returns the name of the file to which this state is associated- Returns:
- String containing the name of the file
-
getURI
URI getURI()Returns the URI of the file to which this state is associated ornull
if the file does not have a URI.- Returns:
- URI of the file to which this state is associated
-
getTimestamp
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:
-
exists
boolean exists()Returns whether the file represented by this state exists.- Returns:
- whether the file represented by this state exists
-
getContentIdentifier
String getContentIdentifier()Returns the unique identifier for this file revision ornull
if one is not available. Ifnull
is returned, clients can use the timestamp to differentiate revisions.- Returns:
- the unique identifier for this file revision
or
null
-
getAuthor
String getAuthor()Returns the author of this revision ornull
if this information is not available.- Returns:
- the author of this revision or
null
-
getComment
String getComment()Returns the comment for this file revision ornull
if this information is not available.- Returns:
- the comment for this file revision or
null
-
getBranches
ITag[] getBranches()Returns the branches names of file revision.- Returns:
- an array of ITag's if branch names exist for this revision or an empty ITag array if no names exist
- Since:
- 3.6
-
getTags
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
boolean isPropertyMissing()Returns whether this particular file revision has at least one supported property missing. If the revision is missing some queries clients can usewithAllProperties(IProgressMonitor)
.- Returns:
- whether this particular file revision has at least one supported property missing
-
withAllProperties
Returns anIFileRevision
with all supported properties present.- Parameters:
monitor
- a monitor- Returns:
- a complete version of this file revision or null
- Throws:
CoreException
- if an error occurs
-