Class RepositoryProviderType
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.team.core.RepositoryProviderType
-
- All Implemented Interfaces:
IAdaptable
- Direct Known Subclasses:
DefaultRepositoryProviderType
public abstract class RepositoryProviderType extends PlatformObject
This class represents things you can ask/do with a type of provider. This is in the absence of a project, as opposed to RepositoryProvider which requires a concrete project in order to be instantiated.A repository provider type class is associated with it's provider ID along with it's corresponding repository provider class. To add a repository provider type and have it registered with the platform, a client must minimally:
- extend
RepositoryProviderType - add the typeClass field to the repository extension in
plugin.xml. Here is an example extension point definition:
<extension point="org.eclipse.team.core.repository">
<repository
class="org.eclipse.myprovider.MyRepositoryProvider"
typeClass="org.eclipse.myprovider.MyRepositoryProviderType"
id="org.eclipse.myprovider.myProviderID">
</repository>
</extension>
Once a repository provider type is registered with Team, then you can access the singleton instance of the class by invoking
RepositoryProviderType.getProviderType().- Since:
- 2.1
- See Also:
getProviderType(String)
-
-
Constructor Summary
Constructors Constructor Description RepositoryProviderType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFileSystemScheme()Return the file system scheme for this provider type ornullif the type doesn't support file systems as defined by theorg.eclipse.core.filesystem.filesystemsextension point.StringgetID()Answer the id of this provider type.ProjectSetCapabilitygetProjectSetCapability()Answers an object for serializing and deserializing of references to projects.static RepositoryProviderTypegetProviderType(String id)Return the RepositoryProviderType for the given provider ID.SubscribergetSubscriber()Return aSubscriberthat describes the synchronization state of the resources contained in the project associated with this provider type.static RepositoryProviderTypegetTypeForScheme(String scheme)Return the repository type for the given file system scheme ornullif there isn't one.voidmetaFilesDetected(IProject project, IContainer[] containers)Callback from team when the meta-files for a repository type are detected in an unshared project.-
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
-
-
-
-
Method Detail
-
getProviderType
public static RepositoryProviderType getProviderType(String id)
Return the RepositoryProviderType for the given provider ID.- Parameters:
id- the ID of the provider- Returns:
- RepositoryProviderType
- See Also:
getID()
-
getTypeForScheme
public static RepositoryProviderType getTypeForScheme(String scheme)
Return the repository type for the given file system scheme ornullif there isn't one. The scheme corresponds to the scheme used for theorg.eclipse.core.filesystem.filesystemsextension point.- Parameters:
scheme- the file system scheme- Returns:
- the repository type for the given file system scheme or
null - Since:
- 3.2
-
getID
public final String getID()
Answer the id of this provider type. The id will be the repository provider type's id as defined in the provider plugin's plugin.xml.- Returns:
- the id of this provider type
-
getProjectSetCapability
public ProjectSetCapability getProjectSetCapability()
Answers an object for serializing and deserializing of references to projects. Given a project, it can produce a UTF-8 encoded String which can be stored in a file. Given this String, it can load a project into the workspace. It also provides a mechanism by which repository providers can be notified when a project set is created and exported. If the provider doesn't wish to provide this feature, return null.Subclasses should override this method to return the appropriate serializer for the associated repository type. It is recommended that serializers not have any references to UI classes so that they can be used in a headless environment.
At this time, the default implementation wrappers the
IProjectSetSerializerinterface if one exists, providing backward compatibility with existing code. At some time in the future, theIProjectSetSerializerinterface will be removed and the default implementation will revert to having limited functionality.- Returns:
- the project set serializer (or
null)
-
metaFilesDetected
public void metaFilesDetected(IProject project, IContainer[] containers)
Callback from team when the meta-files for a repository type are detected in an unshared project. The meta-file paths are provided as part of therepositoryentry in the plugin manifest file.By default, nothing is done (except that the repository type's plugin will have been loaded. Subclass may wish to mark the met-data as team-private. This method is called from a resource delta so subclasses may not obtain scheduling rules or in any way modify workspace resources (including auto-sharing the project). However, auto-sharing (or other modification) could be performed by a background job scheduled from this callback.
- Parameters:
project- the project that contains the detected meta-files.containers- the folders (possibly including the project folder) in which meta-files were found- Since:
- 3.1
-
getSubscriber
public Subscriber getSubscriber()
Return aSubscriberthat describes the synchronization state of the resources contained in the project associated with this provider type. By default,nullis returned. Subclasses may override.- Returns:
- a subscriber that provides resource synchronization state or
null - Since:
- 3.2
-
getFileSystemScheme
public final String getFileSystemScheme()
Return the file system scheme for this provider type ornullif the type doesn't support file systems as defined by theorg.eclipse.core.filesystem.filesystemsextension point.- Returns:
- the file system scheme for this provider type or
null - Since:
- 3.2
-
-