org.apache.felix.deploymentadmin

## Class DeploymentAdminImpl

- java.lang.Object
- - org.apache.felix.deploymentadmin.DeploymentAdminImpl

All Implemented Interfaces:
  org.osgi.framework.Constants, org.osgi.service.deploymentadmin.DeploymentAdmin

    public class DeploymentAdminImpl
    extends Object
    implements org.osgi.service.deploymentadmin.DeploymentAdmin, Constants

### Field Summary

Fields
`static String` `PACKAGE_DIR`
`static String` `PACKAGECONTENTS_DIR`
`static String` `PACKAGEINDEX_FILE`
`static String` `TEMP_DIR`
`static String` `TEMP_POSTFIX`
`static String` `TEMP_PREFIX`

### Fields inherited from interface org.apache.felix.deploymentadmin.Constants

`BUNDLE_LOCATION_PREFIX, BUNDLE_SYMBOLICNAME, BUNDLE_VERSION, CODE_BAD_HEADER, CODE_BUNDLE_NAME_ERROR, CODE_BUNDLE_SHARING_VIOLATION, CODE_CANCELLED, CODE_COMMIT_ERROR, CODE_FOREIGN_CUSTOMIZER, CODE_MISSING_BUNDLE, CODE_MISSING_FIXPACK_TARGET, CODE_MISSING_HEADER, CODE_MISSING_RESOURCE, CODE_NOT_A_JAR, CODE_ORDER_ERROR, CODE_OTHER_ERROR, CODE_PROCESSOR_NOT_FOUND, CODE_RESOURCE_SHARING_VIOLATION, CODE_SIGNING_ERROR, CODE_TIMEOUT, DEPLOYMENTPACKAGE_CUSTOMIZER, DEPLOYMENTPACKAGE_FIXPACK, DEPLOYMENTPACKAGE_ICON, DEPLOYMENTPACKAGE_MISSING, DEPLOYMENTPACKAGE_NAME, DEPLOYMENTPACKAGE_SYMBOLICMAME, DEPLOYMENTPACKAGE_VERSION, EVENTPROPERTY_DEPLOYMENTPACKAGE_CURRENTVERSION, EVENTPROPERTY_DEPLOYMENTPACKAGE_NAME, EVENTPROPERTY_DEPLOYMENTPACKAGE_NEXTVERSION, EVENTPROPERTY_DEPLOYMENTPACKAGE_READABLENAME, EVENTPROPERTY_SUCCESSFUL, EVENTTOPIC_COMPLETE, EVENTTOPIC_INSTALL, EVENTTOPIC_UNINSTALL, RESOURCE_PROCESSOR, SERVICE_PID`

### Fields inherited from interface org.osgi.framework.Constants

`ACTIVATION_LAZY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DOCURL, BUNDLE_LOCALIZATION, BUNDLE_LOCALIZATION_DEFAULT_BASENAME, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_NATIVECODE_LANGUAGE, BUNDLE_NATIVECODE_OSNAME, BUNDLE_NATIVECODE_OSVERSION, BUNDLE_NATIVECODE_PROCESSOR, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SYMBOLICNAME_ATTRIBUTE, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION_ATTRIBUTE, DYNAMICIMPORT_PACKAGE, EXCLUDE_DIRECTIVE, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION_BOOTCLASSPATH, EXTENSION_DIRECTIVE, EXTENSION_FRAMEWORK, FRAGMENT_ATTACHMENT_ALWAYS, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_ATTACHMENT_NEVER, FRAGMENT_ATTACHMENT_RESOLVETIME, FRAGMENT_HOST, FRAMEWORK_BEGINNING_STARTLEVEL, FRAMEWORK_BOOTDELEGATION, FRAMEWORK_BUNDLE_PARENT, FRAMEWORK_BUNDLE_PARENT_APP, FRAMEWORK_BUNDLE_PARENT_BOOT, FRAMEWORK_BUNDLE_PARENT_EXT, FRAMEWORK_BUNDLE_PARENT_FRAMEWORK, FRAMEWORK_EXECPERMISSION, FRAMEWORK_EXECUTIONENVIRONMENT, FRAMEWORK_LANGUAGE, FRAMEWORK_LIBRARY_EXTENSIONS, FRAMEWORK_OS_NAME, FRAMEWORK_OS_VERSION, FRAMEWORK_PROCESSOR, FRAMEWORK_SECURITY, FRAMEWORK_SECURITY_OSGI, FRAMEWORK_STORAGE, FRAMEWORK_STORAGE_CLEAN, FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT, FRAMEWORK_SYSTEMPACKAGES, FRAMEWORK_SYSTEMPACKAGES_EXTRA, FRAMEWORK_TRUST_REPOSITORIES, FRAMEWORK_VENDOR, FRAMEWORK_VERSION, FRAMEWORK_WINDOWSYSTEM, IMPORT_PACKAGE, IMPORT_SERVICE, INCLUDE_DIRECTIVE, MANDATORY_DIRECTIVE, OBJECTCLASS, PACKAGE_SPECIFICATION_VERSION, REQUIRE_BUNDLE, RESOLUTION_DIRECTIVE, RESOLUTION_MANDATORY, RESOLUTION_OPTIONAL, SELECTION_FILTER_ATTRIBUTE, SERVICE_DESCRIPTION, SERVICE_ID, SERVICE_RANKING, SERVICE_VENDOR, SINGLETON_DIRECTIVE, SUPPORTS_BOOTCLASSPATH_EXTENSION, SUPPORTS_FRAMEWORK_EXTENSION, SUPPORTS_FRAMEWORK_FRAGMENT, SUPPORTS_FRAMEWORK_REQUIREBUNDLE, SYSTEM_BUNDLE_LOCATION, SYSTEM_BUNDLE_SYMBOLICNAME, USES_DIRECTIVE, VERSION_ATTRIBUTE, VISIBILITY_DIRECTIVE, VISIBILITY_PRIVATE, VISIBILITY_REEXPORT`

### Constructor Summary

Constructors
Constructor and Description
`DeploymentAdminImpl()` Creates a new `DeploymentAdminImpl` instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `cancel()`
`org.osgi.framework.BundleContext` `getBundleContext()` Returns reference to this bundle's `BundleContext`
`org.osgi.service.deploymentadmin.DeploymentPackage` `getDeploymentPackage(org.osgi.framework.Bundle bundle)`
`org.osgi.service.deploymentadmin.DeploymentPackage` `getDeploymentPackage(String symbName)`
`org.osgi.service.log.LogService` `getLog()` Returns reference to the current logging service defined in the framework.
`org.osgi.service.packageadmin.PackageAdmin` `getPackageAdmin()` Returns reference to the current package admin defined in the framework.
`org.osgi.service.deploymentadmin.DeploymentPackage` `installDeploymentPackage(InputStream sourceInput)`
`org.osgi.service.deploymentadmin.DeploymentPackage[]` `listDeploymentPackages()`
`void` `start()` Called by dependency manager upon start of this component.
`void` `stop()` Called by dependency manager when stopping this component.
`void` `uninstallDeploymentPackage(org.osgi.service.deploymentadmin.DeploymentPackage dp, boolean forced)` Uninstalls the given deployment package from the system.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### PACKAGE_DIR

    public static final String PACKAGE_DIR

See Also:
  Constant Field Values

#### TEMP_DIR

    public static final String TEMP_DIR

See Also:
  Constant Field Values

#### PACKAGECONTENTS_DIR

    public static final String PACKAGECONTENTS_DIR

See Also:
  Constant Field Values

#### PACKAGEINDEX_FILE

    public static final String PACKAGEINDEX_FILE

See Also:
  Constant Field Values

#### TEMP_PREFIX

    public static final String TEMP_PREFIX

See Also:
  Constant Field Values

#### TEMP_POSTFIX

    public static final String TEMP_POSTFIX

See Also:
  Constant Field Values

### Constructor Detail

#### DeploymentAdminImpl

    public DeploymentAdminImpl()

Creates a new `DeploymentAdminImpl` instance.

### Method Detail

#### cancel

    public boolean cancel()

Specified by:
  `cancel` in interface `org.osgi.service.deploymentadmin.DeploymentAdmin`

#### getBundleContext

    public org.osgi.framework.BundleContext getBundleContext()

Returns reference to this bundle's `BundleContext`

Returns:
  This bundle's `BundleContext`

#### getDeploymentPackage

    public org.osgi.service.deploymentadmin.DeploymentPackage getDeploymentPackage(org.osgi.framework.Bundle bundle)

Specified by:
  `getDeploymentPackage` in interface `org.osgi.service.deploymentadmin.DeploymentAdmin`

#### getDeploymentPackage

    public org.osgi.service.deploymentadmin.DeploymentPackage getDeploymentPackage(String symbName)

Specified by:
  `getDeploymentPackage` in interface `org.osgi.service.deploymentadmin.DeploymentAdmin`

#### getLog

    public org.osgi.service.log.LogService getLog()

Returns reference to the current logging service defined in the framework.

Returns:
  Currently active `LogService`.

#### getPackageAdmin

    public org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()

Returns reference to the current package admin defined in the framework.

Returns:
  Currently active `PackageAdmin`.

#### installDeploymentPackage

    public org.osgi.service.deploymentadmin.DeploymentPackage installDeploymentPackage(InputStream sourceInput)
                                                                                throws org.osgi.service.deploymentadmin.DeploymentException

Specified by:
  `installDeploymentPackage` in interface `org.osgi.service.deploymentadmin.DeploymentAdmin`
Throws:
  `org.osgi.service.deploymentadmin.DeploymentException`

#### listDeploymentPackages

    public org.osgi.service.deploymentadmin.DeploymentPackage[] listDeploymentPackages()

Specified by:
  `listDeploymentPackages` in interface `org.osgi.service.deploymentadmin.DeploymentAdmin`

#### start

    public void start()
               throws org.osgi.service.deploymentadmin.DeploymentException

Called by dependency manager upon start of this component.

Throws:
  `org.osgi.service.deploymentadmin.DeploymentException`

#### stop

    public void stop()

Called by dependency manager when stopping this component.

#### uninstallDeploymentPackage

    public void uninstallDeploymentPackage(org.osgi.service.deploymentadmin.DeploymentPackage dp,
                                           boolean forced)
                                    throws org.osgi.service.deploymentadmin.DeploymentException

Uninstalls the given deployment package from the system.

Parameters:
  `dp` - the deployment package to uninstall, cannot be `null`;
  `forced` - `true` to force the uninstall, meaning that any exceptions are ignored during the uninstallation.
Throws:
  `org.osgi.service.deploymentadmin.DeploymentException` - in case the uninstall failed.