org.eclipse.osgi.service.resolver
Class DisabledInfo

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

public final class DisabledInfo
extends java.lang.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:
State

Constructor Summary
DisabledInfo(java.lang.String policyName, java.lang.String message, BundleDescription bundle)
          DisabledInfo constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 BundleDescription getBundle()
          Returns the bundle which is disabled
 java.lang.String getMessage()
          Returns the message describing the reason the bundle is disabled.
 java.lang.String getPolicyName()
          Returns the name of the policy which disabled the bundle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisabledInfo

public DisabledInfo(java.lang.String policyName,
                    java.lang.String message,
                    BundleDescription bundle)
DisabledInfo constructor.

Parameters:
policyName - the name of the policy
message - the message, may be null
bundle - the bundle
Method Detail

getPolicyName

public java.lang.String getPolicyName()
Returns the name of the policy which disabled the bundle.

Returns:
the name of the policy

getMessage

public java.lang.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(java.lang.Object obj)
Overrides:
equals in class java.lang.Object