Examples of PluginManager


Examples of org.datanucleus.plugin.PluginManager

     */
    public AnnotationManagerImpl(MetaDataManager metadataMgr)
    {
        this.metadataMgr = metadataMgr;

        PluginManager pluginMgr = metadataMgr.getNucleusContext().getPluginManager();

        // Load up the registry of available annotation readers
        ConfigurationElement[] elems = pluginMgr.getConfigurationElementsForExtension("org.datanucleus.annotations", null, null);
        if (elems != null)
        {
            for (int i=0;i<elems.length;i++)
            {
                annotationReaderLookup.put(elems[i].getAttribute("annotation-class"), elems[i].getAttribute("reader"));
            }
        }

        // Load up the registry of available class annotation handlers
        elems = pluginMgr.getConfigurationElementsForExtension("org.datanucleus.class_annotation_handler", null, null);
        if (elems != null && elems.length > 0)
        {
            classAnnotationHandlerAnnotations = new HashSet<String>(elems.length);
            classAnnotationHandlers = new HashMap<String, ClassAnnotationHandler>(elems.length);
            for (int i=0; i<elems.length; i++)
            {
                classAnnotationHandlerAnnotations.add(elems[i].getAttribute("annotation-class"));
            }
        }

        // Load up the registry of available member annotation handlers
        elems = pluginMgr.getConfigurationElementsForExtension("org.datanucleus.member_annotation_handler", null, null);
        if (elems != null && elems.length > 0)
        {
            memberAnnotationHandlerAnnotations = new HashSet<String>(elems.length);
            memberAnnotationHandlers = new HashMap<String, MemberAnnotationHandler>(elems.length);
            for (int i=0; i<elems.length; i++)
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

            // Try to create this AnnotationReader
            try
            {
                Class[] ctrArgs = new Class[] {MetaDataManager.class};
                Object[] ctrParams = new Object[] {metadataMgr};
                PluginManager pluginMgr = metadataMgr.getNucleusContext().getPluginManager();
                reader = (AnnotationReader)pluginMgr.createExecutableExtension("org.datanucleus.annotations",
                    "reader", readerClassName, "reader", ctrArgs, ctrParams);
                annotationReaders.put(readerClassName, reader); // Save the annotation reader in case we have more of this type
            }
            catch (Exception e)
            {
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

        if (handler == null)
        {
            // Try to create this ClassAnnotationHandler
            try
            {
                PluginManager pluginMgr = metadataMgr.getNucleusContext().getPluginManager();
                handler = (ClassAnnotationHandler)pluginMgr.createExecutableExtension("org.datanucleus.class_annotation_handler",
                    "annotation-class", annotationName, "handler", null, null);
                classAnnotationHandlers.put(annotationName, handler);
            }
            catch (Exception e)
            {
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

        if (handler == null)
        {
            // Try to create this MemberAnnotationHandler
            try
            {
                PluginManager pluginMgr = metadataMgr.getNucleusContext().getPluginManager();
                handler = (MemberAnnotationHandler)pluginMgr.createExecutableExtension("org.datanucleus.member_annotation_handler",
                    "annotation-class", annotationName, "handler", null, null);
                memberAnnotationHandlers.put(annotationName, handler);
            }
            catch (Exception e)
            {
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

            {
                pluginProps.setProperty("validate-plugins",
                    (String)startupProps.get("datanucleus.plugin.validatePlugins"));
            }
        }
        this.pluginManager = new PluginManager(registryClassName, clr, pluginProps);

        // Load up any default properties from the plugins, and superimpose startup props
        config.setDefaultProperties(pluginManager);
        if (startupProps != null && !startupProps.isEmpty())
        {
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

        }
        else
        {
            // Not yet loaded anything for this method
            ClassLoaderResolver clr = nucleusCtx.getClassLoaderResolver(type != null ? type.getClassLoader() : null);
            PluginManager pluginMgr = nucleusCtx.getPluginManager();
            ConfigurationElement[] elems = pluginMgr.getConfigurationElementsForExtension(
                "org.datanucleus.query_method_evaluators", "method", methodName);
            Map<Object, InvocationEvaluator> evaluators = new HashMap();
            InvocationEvaluator requiredEvaluator = null;
            if (elems == null)
            {
                return null;
            }

            for (int i=0;i<elems.length;i++)
            {
                try
                {
                    String evalName = elems[i].getAttribute("evaluator");
                    InvocationEvaluator eval =
                        (InvocationEvaluator)pluginMgr.createExecutableExtension(
                        "org.datanucleus.query_method_evaluators", new String[] {"method", "evaluator"},
                        new String[] {methodName, evalName}, "evaluator", null, null);

                    String elemClsName = elems[i].getAttribute("class");
                    if (elemClsName != null && StringUtils.isWhitespace(elemClsName))
View Full Code Here

Examples of org.dmd.dmp.server.servlet.base.PluginManager

  // GenericServlet
 
  @Override
  public void init(){
    try {
      pluginManager = new PluginManager(this);
     
      File here = new File(".");
      logger.debug("Running here: " + here.getAbsolutePath());
     
      // Load the plugin definition from file
View Full Code Here

Examples of org.elasticsearch.plugins.PluginManager

      sBuilder.put("gateway.type", "none");

    Settings settings = sBuilder.build();

    final String pluginPath = this.getClass().getResource("/elasticsearch-wordending-tokenfilter-0.0.1.zip").toExternalForm();
    PluginManager pluginManager = new PluginManager(new Environment(settings), pluginPath, PluginManager.OutputMode.VERBOSE, new TimeValue(30000));
    try {
      pluginManager.downloadAndExtract("ybon/elasticsearch-wordending-tokenfilter/0.0.1");
    } catch(IOException e) {
      log.debug("could not install ybon/elasticsearch-wordending-tokenfilter/0.0.1", e);
    }

    if(!test) {
      pluginManager = new PluginManager(new Environment(settings), null, PluginManager.OutputMode.VERBOSE, new TimeValue(30000));
      for(String pluginName : new String[]{"mobz/elasticsearch-head", "polyfractal/elasticsearch-inquisitor", "elasticsearch/marvel/latest"}) {
        try {
          pluginManager.downloadAndExtract(pluginName);
        } catch(IOException e) {
        }
      }
    }
View Full Code Here

Examples of org.gradle.api.internal.plugins.PluginManager

    protected PluginManager createPluginManager() {
        List<MethodRuleDefinitionHandler> handlers = getAll(MethodRuleDefinitionHandler.class);
        ModelRuleInspector inspector = new ModelRuleInspector(Iterables.concat(MethodRuleDefinitionHandler.CORE_HANDLERS, handlers));
        PluginApplicator applicator = new RulesCapablePluginApplicator<ProjectInternal>(project, inspector, get(ModelRuleSourceDetector.class));
        return new PluginManager(get(PluginRegistry.class), new DependencyInjectingInstantiator(this), applicator);
    }
View Full Code Here

Examples of org.gudy.azureus2.plugins.PluginManager

  public MainStatusBar() {
    numberFormat = NumberFormat.getInstance();
    // Proably need to wait for core to be running to make sure dht plugin is fully avail
    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(AzureusCore core) {
        PluginManager pm = core.getPluginManager();
        connection_manager = PluginInitializer.getDefaultInterface().getConnectionManager();
        PluginInterface dht_pi = pm.getPluginInterfaceByClass(DHTPlugin.class);
        if (dht_pi != null) {
          dhtPlugin = (DHTPlugin) dht_pi.getPlugin();
        }
      }
    });
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.