Examples of FrameworkFactory


Examples of com.dotcms.repackage.org.apache.felix.framework.FrameworkFactory

      configProps.put(FELIX_FILEINSTALL_DIR, autoLoadDir);
  }

        try {
            // (8) Create an instance and initialize the framework.
            FrameworkFactory factory = getFrameworkFactory();
            m_fwk = factory.newFramework( configProps );
            m_fwk.init();

            // (9) Use the system bundle context to process the auto-deploy
            // and auto-install/auto-start properties.
            AutoProcessor.process( configProps, m_fwk.getBundleContext() );
View Full Code Here

Examples of com.volantis.mcs.migrate.api.framework.FrameworkFactory

        String filename = "blah.ext";
        final String inputData = "the old input";
        final String outputData = "the new output";

        FrameworkFactory factory = FrameworkFactory.getDefaultInstance();

        Version version1 = factory.createVersion("version 1");
        Version version2 = factory.createVersion("version 2");

        SimpleCLINotificationReporter notificationReporter =
                new SimpleCLINotificationReporter();

        ResourceMigratorBuilder builder =
                factory.createResourceMigratorBuilder(notificationReporter);

        builder.setTarget(version2);

        builder.startType("type");
        builder.setRegexpPathRecogniser(filename);
View Full Code Here

Examples of com.volantis.mcs.migrate.api.framework.FrameworkFactory

    public void testSimpleXSL() throws ResourceMigrationException {

        // Note: We will need a VersionRegistry to handle creating versions on
        // the fly from an XML file, but for now just create them normally.

        FrameworkFactory factory = FrameworkFactory.getDefaultInstance();

        Version v30 = factory.createVersion("3.0");
        Version v35 = factory.createVersion("3.4");

        SimpleCLINotificationReporter notificationReporter =
                new SimpleCLINotificationReporter();

        ResourceMigratorBuilder builder =
                factory.createResourceMigratorBuilder(notificationReporter);

        builder.setTarget(v35);

        builder.startType("lpdm");
        builder.setRegexpPathRecogniser(".*mthm");
 
View Full Code Here

Examples of com.volantis.mcs.migrate.api.framework.FrameworkFactory

            throws ResourceMigrationException, IOException {

        NotificationFactory notificationFactory =
                NotificationFactory.getDefaultInstance();
        ConfigFactory configFactory = ConfigFactory.getDefaultInstance();
        FrameworkFactory frameworkFactory =
                FrameworkFactory.getDefaultInstance();

        NotificationReporter notifier =
                notificationFactory.createLogDispatcherReporter(logger);

        ByteArrayOutputCreator outputCreator = new ByteArrayOutputCreator();
        ResourceMigrator migrator = configFactory.createDefaultResourceMigrator(
                notifier, true);
        InputMetadata meta = frameworkFactory.createInputMetadata(url, false);
        migrator.migrate(meta, stream, outputCreator);
        return outputCreator.getOutputStream().toString();
    }
View Full Code Here

Examples of com.volantis.mcs.migrate.api.framework.FrameworkFactory

public class DefaultConfigFactory extends ConfigFactory {

    public ResourceMigrator createDefaultResourceMigrator(
            NotificationReporter reporter, boolean strictMode) throws ResourceMigrationException {
        FrameworkFactory factory = FrameworkFactory.getDefaultInstance();

        Version rpdm27to30 = factory.createVersion("rpdm 2.7-3.0");
        Version lpdm30 = factory.createVersion("lpdm 3.0");

        Version repository200509 = factory.createVersion("repository 2005/09");
        Version repository200512 = factory.createVersion("repository 2005/12");
        Version repository200602 = factory.createVersion("repository 2006/02");

        ResourceMigratorBuilder builder =
                factory.createResourceMigratorBuilder(reporter);

        // ====================================================================
        //     Repository Migration
        // ====================================================================
View Full Code Here

Examples of org.apache.felix.framework.FrameworkFactory

        if (mustInitAwt(configProperties)) {
                initAwt(configProperties);
        }
   
        try {
      FrameworkFactory frameworkFactory = getFrameworkFactory();
      ArrayList<BundleActivator> activators = new ArrayList<BundleActivator>();

      // Must put the URL handler first because it is used during
      // the auto-update process.
      activators.add(new EPURLHandlerActivator());
      activators.add(new EclipseProjectURLAutoUpdater());

      StringMap stringMap = new StringMap(configProperties, false);
      stringMap.put("felix.systembundle.activators", activators);

      framework = (Felix)frameworkFactory.newFramework(stringMap);
      framework.init();
      AutoProcessor.process(stringMap, framework.getBundleContext());
      framework.start();
      framework.waitForStop(0);
      System.exit(0);
View Full Code Here

Examples of org.apache.felix.framework.FrameworkFactory

        if (mustInitAwt(configProperties)) {
            initAwt(configProperties);
        }

    try {
      FrameworkFactory frameworkFactory = getFrameworkFactory();
      ArrayList<BundleActivator> activators = new ArrayList<BundleActivator>();

      // Must put the URL handler first because it is used during
      // the auto-update process.
      activators.add(new EPURLHandlerActivator());
      activators.add(new EclipseProjectURLAutoUpdater());

      StringMap stringMap = new StringMap(configProperties);
      stringMap.put("felix.systembundle.activators", activators);

      framework = (Felix)frameworkFactory.newFramework(stringMap);
      framework.init();
      AutoProcessor.process(stringMap, framework.getBundleContext());
      framework.start();
      framework.waitForStop(0);
      System.exit(0);
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory

            InputStream is = classLoader.getResourceAsStream("META-INF/services/" + FrameworkFactory.class.getName());
            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.start();
        processAutoProperties(framework.getBundleContext());
        // Start lock monitor
        new Thread() {
            public void run() {
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory

    @Override
    public void execute(CrankstartContext crankstartContext, CrankstartCommandLine commandLine) throws Exception {
        // TODO this should work
        // FrameworkFactory frameworkFactory = java.util.ServiceLoader.load(FrameworkFactory.class).iterator().next();
        final FrameworkFactory frameworkFactory = (FrameworkFactory)getClass().getClassLoader().loadClass("org.apache.felix.framework.FrameworkFactory").newInstance();
        crankstartContext.setOsgiFramework(frameworkFactory.newFramework(crankstartContext.getOsgiFrameworkProperties()));
        crankstartContext.getOsgiFramework().start();
        final int nBundles = crankstartContext.getOsgiFramework().getBundleContext().getBundles().length;
        log.info("OSGi framework started, {} bundles installed", nBundles);
       
        // Unless specified otherwise, stop processing the crankstart file if this is not the first
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory

            InputStream is = classLoader.getResourceAsStream("META-INF/services/" + FrameworkFactory.class.getName());
            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.init();
        // Process properties
        loadStartupProperties(configProps);
        processAutoProperties(framework.getBundleContext());
       
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.