Interface BundleDelta
-
- All Superinterfaces:
Comparable<BundleDelta>
public interface BundleDelta extends Comparable<BundleDelta>
BundleDeltas represent the changes related to an individual bundle between two states.This interface is not intended to be implemented by clients. The
StateObjectFactory
should be used to construct instances.- Since:
- 3.1
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADDED
Delta type constant (bit mask) indicating that the bundle has been added to the new state.static int
LINKAGE_CHANGED
Deprecated.this type is no longer validstatic int
OPTIONAL_LINKAGE_CHANGED
Deprecated.this type is no longer validstatic int
REMOVAL_COMPLETE
Delta type constant (bit mask) indicating that the this bundle has completed a pending removal.static int
REMOVAL_PENDING
Delta type constant (bit mask) indicating that the this bundle is pending a removal.static int
REMOVED
Delta type constant (bit mask) indicating that the bundle is no longer present in the new state.static int
RESOLVED
Delta type constant (bit mask) indicating that the bundle has become resolved in the new state.static int
UNRESOLVED
Delta type constant (bit mask) indicating that the bundle has become unresolved in the new state.static int
UPDATED
Delta type constant (bit mask) indicating that the bundle has been updated between the old and new state.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compareTo(BundleDelta obj)
Answers an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver's class.BundleDescription
getBundle()
Returns the BundleDescription that this bundle delta is for.int
getType()
Returns the type of change which occured.
-
-
-
Field Detail
-
ADDED
static final int ADDED
Delta type constant (bit mask) indicating that the bundle has been added to the new state.- See Also:
getType()
, Constant Field Values
-
REMOVED
static final int REMOVED
Delta type constant (bit mask) indicating that the bundle is no longer present in the new state.- See Also:
getType()
, Constant Field Values
-
UPDATED
static final int UPDATED
Delta type constant (bit mask) indicating that the bundle has been updated between the old and new state. Note that an update delta may in fact represent a downgrading of the bundle to a previous version.- See Also:
getType()
, Constant Field Values
-
RESOLVED
static final int RESOLVED
Delta type constant (bit mask) indicating that the bundle has become resolved in the new state.- See Also:
getType()
, Constant Field Values
-
UNRESOLVED
static final int UNRESOLVED
Delta type constant (bit mask) indicating that the bundle has become unresolved in the new state. Note that newly added bundles are unresolved by default and as such, do not transition to unresolved state so this flag is not set.- See Also:
getType()
, Constant Field Values
-
LINKAGE_CHANGED
static final int LINKAGE_CHANGED
Deprecated.this type is no longer validDelta type constant (bit mask) indicating that the bundles and packages which this bundle requires/imports (respectively) have changed in the new state.- See Also:
getType()
, Constant Field Values
-
OPTIONAL_LINKAGE_CHANGED
static final int OPTIONAL_LINKAGE_CHANGED
Deprecated.this type is no longer validDelta type constant (bit mask) indicating that the bundles which this bundle optionally requires have changed in the new state.- See Also:
getType()
, Constant Field Values
-
REMOVAL_PENDING
static final int REMOVAL_PENDING
Delta type constant (bit mask) indicating that the this bundle is pending a removal. Note that bundles with this flag set will also have theREMOVED
flag set. A bundle will have this flag set if it has been removed from the state but has other existing bundles in the state that depend on it.- See Also:
getType()
, Constant Field Values
-
REMOVAL_COMPLETE
static final int REMOVAL_COMPLETE
Delta type constant (bit mask) indicating that the this bundle has completed a pending removal. A bundle will complete a pending removal only after it has been re-resolved by the resolver.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBundle
BundleDescription getBundle()
Returns the BundleDescription that this bundle delta is for.- Returns:
- the BundleDescription that this bundle delta is for.
-
getType
int getType()
Returns the type of change which occured. The return value is composed of by bit-wise masking the relevant flags from the set ADDED, REMOVED, UPDATED, RESOLVED, UNRESOLVED, LINKAGE_CHANGED, REMOVAL_PENDING, REMOVAL_COMPLETE. Note that bundle start and stop state changes are not captured in the delta as they do not represent structural changes but rather transient runtime states.- Returns:
- the type of change which occured
-
compareTo
int compareTo(BundleDelta obj)
Answers an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver's class.The natural order of elements is determined by the bundle id of the BundleDescription that this bundle delta is for.
- Specified by:
compareTo
in interfaceComparable<BundleDelta>
- Parameters:
obj
- another BundleDelta an object to compare the receiver to- Returns:
- int which should be <0 if the receiver should sort before the argument, 0 if the receiver should sort in the same position as the argument, and >0 if the receiver should sort after the argument.
- Throws:
ClassCastException
- if the argument can not be converted into something comparable with the receiver.- Since:
- 3.7
-
-