package org.osgi.test.cases.transaction;

import java.util.StringTokenizer;

import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.test.support.signature.DefaultSignatureTestControl;

public class TransactionSignatureTest extends DefaultSignatureTestControl {

    /**
     * test signature per packages specified in the bundle manifest header 
     * - Signature-Packages.
     * 
     */
    public void testSignature() throws Exception {
        BundleContext bc = super.getContext();
        Bundle b = bc.getBundle();
        String signatures = (String) b.getHeaders().get("Signature-Packages");
        StringTokenizer st = new StringTokenizer(signatures, " ,");
        int n = st.countTokens();
        for (int i=0; i<n; i++ ) {
            String signature = st.nextToken().replace('.', '/');
            super.doPackage(b, signature, this);
            //progress(100 * (i+1)/n);
        }
    }
}

@@ -1,12 +1,1414 @@
+/* %0A * Copyright (c) The OSGi Alliance (2009). All Rights Reserved.%0A * %0A * Implementation of certain elements of the OSGi Specification may be subject%0A * to third party intellectual property rights, including without limitation,%0A * patent rights (such a third party may or may not be a member of the OSGi%0A * Alliance). The OSGi Alliance is not responsible and shall not be held%0A * responsible in any manner for identifying or failing to identify any or all%0A * such third party intellectual property rights.%0A * %0A * This document and the information contained herein are provided on an %22AS IS%22%0A * basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,%0A * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION%0A * HEREIN WILL NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF%0A * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE%0A * OSGI ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF%0A * USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR%0A * EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN%0A * CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF%0A * ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.%0A * %0A * All Company, brand and product names may be trademarks that are the sole%0A * property of their respective owners. All rights reserved.%0A */%0A%0A
 package org.
@@ -1616,16 +1616,203 @@
 ntrol;%0A%0A
+/**%0A * @version $Rev$ $Date$%0A * %0A *          Signature test for RFC 98 imported API (e.g. JTA v1.1)%0A *          test method originated from org.osgi.test.cases.signature%0A *          %0A */%0A
 public c

add header and revision information, using the license header from the original org.osgi.test.cases.signature test class