Examples of ArtifactData


Examples of org.apache.ace.deployment.provider.ArtifactData

    /**
     * make a bundle with the given symbolic name and version in the given file.
     */
    private ArtifactData generateBundle(File file, Map<String, String> directives, String symbolicName, String version,
        Map<String, String> additionalHeaders) throws Exception {
        ArtifactData bundle = new ArtifactDataImpl(file.toURI().toURL(), directives, symbolicName, version, false);
        if (additionalHeaders == null) {
            BundleStreamGenerator.generateBundle(bundle);
        }
        else {
            BundleStreamGenerator.generateBundle(bundle, additionalHeaders);
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    public void testSingleUnchangedBundleMultipleVersions() throws IOException {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(TARGET, VERSION1, VERSION1);
        assert bundleData.size() == 1 : "Expect one bundle, got " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            assert !data.hasChanged() : "The data should not have been changed.";
        }
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    public void testMultipleBundlesMultipleVersions() throws IOException {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION1);
        assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            assert !data.hasChanged() : "The data should not have been changed.";
        }
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    public void testAddedBundleMultipleVersions() throws IOException {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION3, VERSION1);
        assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            if (data.getSymbolicName().equals("Bundle4")) {
                assert !data.hasChanged() : "The data (Bundle4) should not have been changed.";
            }
            else {
                assert data.hasChanged() : "The data (Bundle3) should have been changed.";
            }
        }
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    public void testSingleChangedBundleMultipleVersions() throws IOException {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION4);
        assert bundleData.size() == 2 : "Expected two bundles to be found, but found " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            if (data.equals(BUNDLE3_2)) {
                assert !data.hasChanged() : "The data should not have been changed.";
            }
            else if (data.equals(BUNDLE4_2)) {
                assert data.hasChanged() : "The data should have been changed.";
            }
            else {
                assert false : "Unknown bundle found";
            }
        }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    public void testMultipleChangedBundlesMultipleVersions() throws IOException {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION2);
        assert bundleData.size() == 2 : "Expected two bundles to be found, but found " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            if (data.equals(BUNDLE4_1)) {
                assert data.hasChanged() : "The data should have been changed.";
            }
            else if (data.equals(BUNDLE5)) {
                assert data.hasChanged() : "The data should have been changed.";
            }
            else {
                assert false : "Unknown bundle found";
            }
        }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

        Collection<ArtifactData> bundleData = m_backend.getBundleData(RESOURCETARGET, versions.get(0));

        assert bundleData.size() == 4 : "Expected four bundle to be found, but found " + bundleData.size();
        Iterator<ArtifactData> it = bundleData.iterator();
        while (it.hasNext()) {
            ArtifactData data = it.next();
            if (data.equals(BUNDLE1)) {
                // fine
            }
            else if (data.equals(RESOURCEPROCESSOR1)) {
                // fine
            }
            else if (data.equals(ARTIFACT1)) {
                // fine
            }
            else if (data.equals(ARTIFACT2)) {
                // check the filename
                assert data.getFilename().equals("Artifact2");
                assert data.getProcessorPid().equals("my.processor.pid");
            }
            else {
                assert false : "Unknown bundle found";
            }
        }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

            m_fixPack = fixPack;
            next();
        }

        private void next() throws IOException {
            ArtifactData current = (m_iter.hasNext()) ? m_iter.next() : null;

            if (current == null) {
                m_output.close();
            }
            else if (!m_fixPack || current.hasChanged()) {
                m_current = current.getUrl().openStream();
                m_output.putNextEntry(new ZipEntry(current.getFilename()));
            }
            else {
                next();
            }
        }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

import org.testng.annotations.Test;

public class BindexMetadataTest {

    private ArtifactData generateBundle(File file, String symbolicName, String version) throws Exception {
        ArtifactData bundle = new ArtifactDataImpl(file.getName(), symbolicName, version, file.toURI().toURL(), false);
        BundleStreamGenerator.generateBundle(bundle);
        return bundle;
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.ArtifactData

    /**
     * make a bundle with the given symbolic name and version in the given file.
     */
    private ArtifactData generateBundle(File file, Map<String, String> directives, String symbolicName, String version, Map<String, String> additionalHeaders) throws Exception {
        ArtifactData bundle = new ArtifactDataImpl(file.toURI().toURL(), directives, symbolicName, version, false);
        if (additionalHeaders == null) {
            BundleStreamGenerator.generateBundle(bundle);
        }
        else {
            BundleStreamGenerator.generateBundle(bundle, additionalHeaders);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.