org.eclipse.core.runtime.spi
Class RegistryContributor

java.lang.Object
  extended by org.eclipse.core.runtime.spi.RegistryContributor
All Implemented Interfaces:
IContributor

public final class RegistryContributor
extends java.lang.Object
implements IContributor

This class describes a registry contributor which is an entity that supplies information to the extension registry. Depending on the registry strategy, contributor might delegate some of its functionality to a "host" contributor. For instance, OSGi registry strategy uses "host" contributor to delegate some functionality from fragments to plug-ins.

This class can be instantiated by the registry Service Providers.

This class can be used without OSGi running.

This class can not be extended.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
org.eclipse.equinox.registry 3.2

Constructor Summary
RegistryContributor(java.lang.String actualId, java.lang.String actualName, java.lang.String hostId, java.lang.String hostName)
          Constructor for the registry contributor.
 
Method Summary
 java.lang.String getActualId()
          Provides actual ID associated with the registry contributor (e.g., "12").
 java.lang.String getActualName()
          Provides actual name of the registry contributor (e.g., "org.eclipe.core.runtime.fragment").
 java.lang.String getId()
          Provides ID associated with the entity "in charge" of the contributor (e.g., "1").
 java.lang.String getName()
          Provides name of the entity "in charge" of the contributor (e.g., "org.eclipse.core.runtime").
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegistryContributor

public RegistryContributor(java.lang.String actualId,
                           java.lang.String actualName,
                           java.lang.String hostId,
                           java.lang.String hostName)
Constructor for the registry contributor.

The actual ID is a string identifier for the contributor (e.g., "12") and is expected to be unique within the workspace. The actual ID of the contributor must not be null.

The actual name is the name associated with the contributor (e.g., "org.eclipse.core.runtime.fragment"). The actual name of the contributor must not be null.

The host ID is the identifier associated with the entity "in charge" of the contributor (e.g., "1"). IDs are expected to be unique in the workspace. If contributor does not rely on a host, then null should be used as the host ID.

The host name is the name of the entity "in charge" of the contributor (e.g., "org.eclipse.core.runtime"). If contributor does not rely on a host, then null should be used as the host name.

There should be 1-to-1 mapping between the contributor and the contibutor ID. The IDs (either actual or host) can not be re-used in the same registry. For example, if ID of 12 was used to identify contributorA, the ID of 12 can not be used to identify contributorB or a host for the contributorC.

Parameters:
actualId - contributor identifier
actualName - name of the contributor
hostId - id associated with the host, or null
hostName - name of the host, or null
Method Detail

getActualId

public java.lang.String getActualId()
Provides actual ID associated with the registry contributor (e.g., "12"). IDs are expected to be unique in the workspace.

Returns:
actual ID of the registry contributor

getActualName

public java.lang.String getActualName()
Provides actual name of the registry contributor (e.g., "org.eclipe.core.runtime.fragment").

Returns:
actual name of the registry contributor

getId

public java.lang.String getId()
Provides ID associated with the entity "in charge" of the contributor (e.g., "1"). IDs are expected to be unique in the workspace. If contributor does not rely on a host, this value should be the same as the actual contributor ID.

Returns:
id of the registry contributor

getName

public java.lang.String getName()
Provides name of the entity "in charge" of the contributor (e.g., "org.eclipse.core.runtime"). If contributor does not rely on a host, this value should be the same as the actual contributor name.

Specified by:
getName in interface IContributor
Returns:
name of the registry contributor

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object