Class DisabledInfo

java.lang.Object
org.eclipse.osgi.service.resolver.DisabledInfo

public final class DisabledInfo extends Object
A disabled info represents a policy decision to disable a bundle which exists in a State. Bundles may be disabled by adding disabled info with the State.addDisabledInfo(DisabledInfo) method and enabled by removing disabled info with the State.removeDisabledInfo(DisabledInfo) method. A bundle is not considered to be enabled unless there are no disabled info objects for the bundle.

While resolving the bundle if the Resolver encounters a BundleDescription which has disabled info returned by State.getDisabledInfos(BundleDescription) then the bundle must not be allowed to resolve and a ResolverError of type ResolverError.DISABLED_BUNDLE must be added to the state.

Since:
3.4
See Also:
  • Constructor Details

    • DisabledInfo

      public DisabledInfo(String policyName, String message, BundleDescription bundle)
      DisabledInfo constructor.
      Parameters:
      policyName - the name of the policy
      message - the message, may be null
      bundle - the bundle
  • Method Details

    • getPolicyName

      public String getPolicyName()
      Returns the name of the policy which disabled the bundle.
      Returns:
      the name of the policy
    • getMessage

      public String getMessage()
      Returns the message describing the reason the bundle is disabled.
      Returns:
      the message
    • getBundle

      public BundleDescription getBundle()
      Returns the bundle which is disabled
      Returns:
      the bundle which is disabled
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object