Examples of ArtifactDataImpl


Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

    /**
     * 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, version, file.toURI().toURL(), false);
        BundleStreamGenerator.generateBundle(bundle);
        return bundle;
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

        // configure file based backend
        configure(org.apache.ace.deployment.provider.filebased.Activator.PID, "BaseDirectoryName", m_tempDir.getAbsolutePath());
    }

    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.impl.ArtifactDataImpl

                                            };
                                        }
                                    };
                                }
                            });
                            bundleData.add(new ArtifactDataImpl(jarFile.getName(), symbolicName, bundleVersion, bundleUrl, true));
                        }
                        catch (IllegalArgumentException iae) {
                            m_log.log(LogService.LOG_WARNING, "Invalid bundle:" + jarFile.getAbsolutePath() + " has an illegal version", iae);
                        }
                        catch (MalformedURLException mue) {
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

        List<ArtifactData> dataVersionFrom = getBundleData(targetId, versionFrom);
        List<ArtifactData> dataVersionTo = getBundleData(targetId, versionTo);

        Iterator<ArtifactData> it = dataVersionTo.iterator();
        while (it.hasNext()) {
            ArtifactDataImpl bundleDataVersionTo = (ArtifactDataImpl) it.next();
            // see if there was previously a version of this bundle.
            ArtifactData bundleDataVersionFrom = getBundleData(bundleDataVersionTo.getSymbolicName(), dataVersionFrom);
            bundleDataVersionTo.setChanged(!bundleDataVersionTo.equals(bundleDataVersionFrom));
        }
        return dataVersionTo;
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

        if ((pairs != null) && (pairs.length > 1)) {
            dataVersionFrom = getAllArtifactData(pairs[0]);
            dataVersionTo = getAllArtifactData(pairs[1]);
            Iterator<ArtifactData> it = dataVersionTo.iterator();
            while (it.hasNext()) {
                ArtifactDataImpl bundleDataVersionTo = (ArtifactDataImpl) it.next();
                // see if there was previously a version of this bundle, and update the 'changed' property accordingly.
                if (bundleDataVersionTo.isBundle()) {
                    ArtifactData bundleDataVersionFrom = getArtifactData(bundleDataVersionTo.getSymbolicName(), dataVersionFrom);
                    bundleDataVersionTo.setChanged(!bundleDataVersionTo.equals(bundleDataVersionFrom));
                }
                else {
                    ArtifactData bundleDataVersionFrom = getArtifactData(bundleDataVersionTo.getUrl(), dataVersionFrom);
                    bundleDataVersionTo.setChanged(bundleDataVersionFrom == null);
                }
            }
        }
        else {
            dataVersionTo = getAllArtifactData(pairs[0]);
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

                    // it is the right symbolic name
                    if (symbolicName.trim().equals("")) {
                        m_log.log(LogService.LOG_WARNING, "Invalid bundle:" + pair.toString() + " the symbolic name is empty.");
                    }
                    else {
                        result.add(new ArtifactDataImpl(pair.getUrl(), directives, symbolicName, bundleVersion, true));
                    }
                }
            }
            else {
                // it is an artifact.
                String filename = directives.get(DIRECTIVE_KEY_RESOURCE_ID);
                result.add(new ArtifactDataImpl(filename, pair.getUrl(), directives, true));
            }

        }
        return result;
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

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.impl.ArtifactDataImpl

    /**
     * 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, version, file.toURI().toURL(), false);
        BundleStreamGenerator.generateBundle(bundle);
        return bundle;
    }
View Full Code Here

Examples of org.apache.ace.deployment.provider.impl.ArtifactDataImpl

    /**
     * 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.impl.ArtifactDataImpl

        Map<String, String> attr = new HashMap<String, String>();
        attr.put(DIRECTIVE_ISCUSTOMIZER, "true");
        RESOURCEPROCESSOR1 = generateBundle(FileUtils.createTempFile(m_tempDirectory), attr, "Autoconf", "1.0.0", null);
        attr = new HashMap<String, String>();
        attr.put(DIRECTIVE_KEY_PROCESSORID, "my.processor.pid");
        ARTIFACT1 = new ArtifactDataImpl(FileUtils.createTempFile(m_tempDirectory).toURI().toURL(), attr, false);
        attr = new HashMap<String, String>();
        attr.put(DIRECTIVE_KEY_PROCESSORID, "my.processor.pid");
        attr.put(DIRECTIVE_KEY_RESOURCE_ID, "Artifact2");
        ARTIFACT2 = new ArtifactDataImpl(FileUtils.createTempFile(m_tempDirectory).toURI().toURL(), attr, false);
    }
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.