Package org.eclipse.team.core.variants
Interface IResourceVariant
-
- All Known Implementing Classes:
CachedResourceVariant
public interface IResourceVariantThis interface is used bySyncInfoinstances to provide access to the base and remote resources that correspond to a local resource.- Since:
- 3.0
- See Also:
SyncInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]asBytes()Return an array of bytes that can be used to uniquely identify this resource variant when compared to other resource variants and could also potentially be used to recreate a resource variant handle.booleanequals(Object object)Returns whether the remote resource is equal to the provided object.StringgetContentIdentifier()Return a content identifier that is used to differentiate versions or revisions of the same resource.StringgetName()Answers the name of the remote resource.IStoragegetStorage(IProgressMonitor monitor)Return an instance of IStorage ornullif the remote resource does not have contents (i.e. is a folder).booleanisContainer()Answers if the remote resource may have children.
-
-
-
Method Detail
-
getName
String getName()
Answers the name of the remote resource. The name may be displayed to the user.- Returns:
- name of the resource variant.
-
isContainer
boolean isContainer()
Answers if the remote resource may have children.- Returns:
trueif the remote resource may have children andfalseotherwise.
-
getStorage
IStorage getStorage(IProgressMonitor monitor) throws TeamException
Return an instance of IStorage ornullif the remote resource does not have contents (i.e. is a folder). Since theISorage#getContents()method does not accept anIProgressMonitor, this method must ensure that the contents access by the resultingIStorageis cached locally (hence theIProgressMonitorargument to this method). Implementations of this method should ensure that the resultingIStorageis accessing locally cached contents and is not contacting the server.The returned storage object may be an instance of (@link org.eclipse.core.resources.IEncodedStorage} in which case clients can determine the character encoding of the contents.
- Parameters:
monitor- a progress monitor- Returns:
- an
IStoragethat provides access to the contents of the remote resource ornullif the remote resource is a container. - Throws:
TeamException
-
getContentIdentifier
String getContentIdentifier()
Return a content identifier that is used to differentiate versions or revisions of the same resource.- Returns:
- a String that identifies the version of the subscriber resource
-
asBytes
byte[] asBytes()
Return an array of bytes that can be used to uniquely identify this resource variant when compared to other resource variants and could also potentially be used to recreate a resource variant handle.- Returns:
- the bytes that uniquely identify this resource variant
-
-