Examples of ArtifactData


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

     * @param symbolicName
     */
    private ArtifactData getBundleData(String symbolicName, Collection<ArtifactData> data) {
        Iterator<ArtifactData> it = data.iterator();
        while (it.hasNext()) {
            ArtifactData bundle = it.next();
            if (bundle.getSymbolicName().equals(symbolicName)) {
                return bundle;
            }
        }
        return null;
    }
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, String symbolicName, String version) throws Exception {
        ArtifactData bundle = new ArtifactDataImpl(file.getName(), symbolicName, file.length(), version, file.toURI().toURL(), false);
        BundleStreamGenerator.generateBundle(bundle);
        return bundle;
    }
View Full Code Here

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

    public void testSingleUnchangedBundleMultipleVersions() {
        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.getSize() > 200 : "Bundle has no sensible size?!";
            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() {
        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() {
        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();
            assert data.hasChanged() : "The data should have been changed.";
        }
    }
View Full Code Here

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

    public void testSingleChangedBundleMultipleVersions() {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION4);
        assert bundleData.size() == 2 : "Expected one bundle 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() {
        Collection<ArtifactData> bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION2);
        assert bundleData.size() == 2 : "Expected one bundle 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

     * 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 {
        // create a mock bundle, which is only used to generate the bundle on disk, and not used for anything else...
        ArtifactData bundle = new ArtifactDataImpl(file.toURI().toURL(), directives, symbolicName, -1L, 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 Exception {
        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.getSize() == 100 : "Bundle has no sensible size?! " + data.getSize();
            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 Exception {
        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
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.