<commit_before>/*
 * $Header$
 * 
 * Copyright (c) The OSGi Alliance (2005). All Rights Reserved.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this 
 * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.
 */
package org.osgi.service.deploymentadmin.spi;

import org.osgi.service.deploymentadmin.DeploymentPackage;

/**
 * The session interface represents a currently running deployment session 
 * (install/update/uninstall).<p>
 * 
 * When a deployment package is installed the target package, when uninstalled the 
 * source package is an empty deployment package. The empty deployment package is a virtual 
 * entity it doesn't appear for the outside world. It is only visible on the 
 * DeploymentSession interface used by Resource Processors. Although  the empty package 
 * is only visible for Resource Processors it has the following characteristics:<p>
 *  
 * <ul>
 *     <li>has version 0.0.0</li>
 *     <li>its name is an empty string</li>
 *     <li>it is stale</li>
 *     <li>it has no bundles
 *     		(see {@link DeploymentPackage#getBundle(String)})</li>
 *     <li>it has no resources
 *     		(see {@link DeploymentPackage#getResources()})</li>
 *     <li>it has no headers except <p>
 *     		<code>DeploymentPackage-SymbolicName</code> and <p>
 *     		<code>DeploymentPackage-Version</code> <p>
 *     		(see {@link DeploymentPackage#getHeader(String)})</li>
 *     <li>it has no resource headers (see 
 *     		{@link DeploymentPackage#getResourceHeader(String, String)})</li>
 *     <li>{@link DeploymentPackage#uninstall()} throws
 *     		{@link java.lang.IllegalStateException}</li>
 *     <li>{@link DeploymentPackage#uninstallForced()} throws
 *     		{@link java.lang.IllegalStateException}</li>
 * </ul>
 *  
 */
public interface DeploymentSession {
    
    /**
     * If the deployment action is an update or an uninstall, this call returns
     * the <code>DeploymentPackage</code> instance for the installed deployment package. If the 
     * deployment action is an install, this call returns the empty deploymet package (see
     * {@link DeploymentPackage}).
     * 
     * @return the target deployment package
     * @see DeploymentPackage<commit_msg>Use of <p> inside <li> is not allowed, replaced with <br/><commit_after>/*
 * $Header$
 * 
 * Copyright (c) The OSGi Alliance (2005). All Rights Reserved.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this 
 * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.
 */
package org.osgi.service.deploymentadmin.spi;

import org.osgi.service.deploymentadmin.DeploymentPackage;

/**
 * The session interface represents a currently running deployment session 
 * (install/update/uninstall).<p>
 * 
 * When a deployment package is installed the target package, when uninstalled the 
 * source package is an empty deployment package. The empty deployment package is a virtual 
 * entity it doesn't appear for the outside world. It is only visible on the 
 * DeploymentSession interface used by Resource Processors. Although  the empty package 
 * is only visible for Resource Processors it has the following characteristics:<p>
 *  
 * <ul>
 *     <li>has version 0.0.0</li>
 *     <li>its name is an empty string</li>
 *     <li>it is stale</li>
 *     <li>it has no bundles
 *     		(see {@link DeploymentPackage#getBundle(String)})</li>
 *     <li>it has no resources
 *     		(see {@link DeploymentPackage#getResources()})</li>
 *     <li>it has no headers except <br/>
 *     		<code>DeploymentPackage-SymbolicName</code> and <br/>
 *     		<code>DeploymentPackage-Version</code> <br/>
 *     		(see {@link DeploymentPackage#getHeader(String)})</li>
 *     <li>it has no resource headers (see 
 *     		{@link DeploymentPackage#getResourceHeader(String, String)})</li>
 *     <li>{@link DeploymentPackage#uninstall()} throws
 *     		{@link java.lang.IllegalStateException}</li>
 *     <li>{@link DeploymentPackage#uninstallForced()} throws
 *     		{@link java.lang.IllegalStateException}</li>
 * </ul>
 *  
 */
public interface DeploymentSession {
    
    /**
     * If the deployment action is an update or an uninstall, this call returns
     * the <code>DeploymentPackage</code> instance for the installed deployment package. If the 
     * deployment action is an install, this call returns the empty deploymet package (see
     * {@link DeploymentPackage}).
     * 
     * @return the target deployment package
     * @see DeploymentPackage
{'fraction_non_alphanumeric': 0.10707416114554393, 'fraction_numerical': 0.004701859371660611, 'mean_word_length': 3.539282250242483, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 68, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1924203', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1313, 'n_words': 453}