org.eclipse.osgi.internal.resolver
Class UserState

java.lang.Object
  extended by org.eclipse.osgi.internal.resolver.StateImpl
      extended by org.eclipse.osgi.internal.resolver.UserState
All Implemented Interfaces:
State

public class UserState
extends StateImpl

This implementation of State does a bookkeeping of all added/removed


Field Summary
 
Fields inherited from class org.eclipse.osgi.internal.resolver.StateImpl
PROPS
 
Constructor Summary
UserState()
           
 
Method Summary
 StateDelta compare(State baseState)
          Returns a delta describing the differences between this state and the given state.
 boolean removeBundle(BundleDescription description)
          Removes the given bundle description.
 boolean updateBundle(BundleDescription newDescription)
          Updates an existing bundle description with the given description.
 
Methods inherited from class org.eclipse.osgi.internal.resolver.StateImpl
addBundle, addDisabledInfo, addResolverError, dynamicCacheChanged, fullyLoad, getBundle, getBundle, getBundleByLocation, getBundles, getBundles, getChanges, getDisabledBundles, getDisabledInfo, getDisabledInfos, getExportedPackages, getFactory, getHighestBundleId, getPlatformProperties, getRemovalPendings, getResolvedBundles, getResolver, getResolverErrors, getStateHelper, getSystemBundle, getSystemPackages, getTimeStamp, isEmpty, isResolved, linkDynamicImport, removeBundle, removeBundleComplete, removeDisabledInfo, removeResolverErrors, resolve, resolve, resolve, resolveBundle, resolveBundle, resolveConstraint, setNativePathsInvalid, setOverrides, setPlatformProperties, setPlatformProperties, setResolver, setTimeStamp, unloadLazyData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserState

public UserState()
Method Detail

removeBundle

public boolean removeBundle(BundleDescription description)
Description copied from interface: State
Removes the given bundle description.

Specified by:
removeBundle in interface State
Overrides:
removeBundle in class StateImpl
Parameters:
description - the bundle description to be removed
Returns:
true, if if the bundle description was removed, false otherwise

updateBundle

public boolean updateBundle(BundleDescription newDescription)
Description copied from interface: State
Updates an existing bundle description with the given description.

Specified by:
updateBundle in interface State
Overrides:
updateBundle in class StateImpl
Parameters:
newDescription - the bundle description to replace an existing one
Returns:
true, if if the bundle description was updated, false otherwise

compare

public StateDelta compare(State baseState)
                   throws BundleException
Description copied from interface: State
Returns a delta describing the differences between this state and the given state. The given state is taken as the base so the absence of a bundle in this state is reported as a deletion, etc.

Note that the generated StateDelta will contain BundleDeltas with one of the following types: BundleDelta.ADDED, BundleDelta.REMOVED and BundleDelta.UPDATED

Parameters:
baseState - the base state
Returns:
a delta describing differences between this and the base state state
Throws:
BundleException


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.