Examples of ConfigurationElement


Examples of org.jboss.forge.maven.plugins.ConfigurationElement

      MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
      MavenPlugin compiler = pluginFacet.getPlugin(compilerDependency);
      Configuration config = compiler.getConfig();
      if (!config.hasConfigurationElement("proc"))
      {
         ConfigurationElement proc = ConfigurationBuilder.create().createConfigurationElement("proc").setText("none");
         config.addConfigurationElement(proc);
         ((MavenPluginAdapter)compiler).setConfig(config);
      }
      pluginFacet.updatePlugin(compiler);
   }
View Full Code Here

Examples of org.jboss.forge.maven.plugins.ConfigurationElement

         if (plugin.listExecutions().size() > 0)
         {
            Configuration config = plugin.listExecutions().get(0).getConfig();
            if (config.hasConfigurationElement("processors"))
            {
               ConfigurationElement element = config.getConfigurationElement("processors").getChildByName("processor");
               return element.getText().equals(provider.getProcessor());
            }
         }
      }
      return false;
   }
View Full Code Here

Examples of org.jnode.plugin.ConfigurationElement

    private void loadHandlers(Extension ext) {
        final ConfigurationElement[] elems = ext.getConfigurationElements();
        final int count = elems.length;
        final ClassLoader cl = ext.getDeclaringPluginDescriptor().getPluginClassLoader();
        for (int i = 0; i < count; i++) {
            final ConfigurationElement elem = elems[i];
            if (elem.getName().equals("handler")) {
                final String protocol = elem.getAttribute("protocol");
                final String className = elem.getAttribute("class");
                if ((protocol != null) && (className != null)) {
                    try {
                        final Class<? extends URLStreamHandler> cls = cl.loadClass(className);
                        handlerClasses.put(protocol, cls);
                    } catch (ClassNotFoundException ex) {
View Full Code Here

Examples of org.jnode.plugin.ConfigurationElement

            codeSource2Permissions.put(cs, perms);
            // BootLogInstance.get().debug("Adding permissions for " + cs);
            final ConfigurationElement[] elems = ext.getConfigurationElements();
            final int count = elems.length;
            for (int i = 0; i < count; i++) {
                final ConfigurationElement elem = elems[i];
                final String type = elem.getAttribute("class");
                final String name = elem.getAttribute("name");
                final String actions = elem.getAttribute("actions");

                if (type != null) {
                    final Object perm;
                    try {
                        final Class permClass = cl.loadClass(type);
View Full Code Here

Examples of org.jnode.plugin.ConfigurationElement

            final Extension ext = exts[i];

            final ConfigurationElement[] elems = ext.getConfigurationElements();
            log.debug("Found " + elems.length + "ce's");
            for (int k = 0; k < elems.length; k++) {
                final ConfigurationElement ce = elems[k];
                if (ce.getName().equals("application")) {
                    final String name = ce.getAttribute("name");
                    final String className = ce.getAttribute("class");
                    if ((name != null) && (className != null)) {
                        log.debug("Adding app " + name);
                        addApp(name, new ActionListener() {
                            public void actionPerformed(ActionEvent e) {
                                startApp(name, className);
View Full Code Here

Examples of org.jpox.plugin.ConfigurationElement

                ",Name=StoreManagerRuntime";
            mgntServer.registerMBean(this.storeManagerRuntime, mbeanName);
        }

        // Factory for connections - transactional
        ConfigurationElement cfElem = omfContext.getPluginManager().getConfigurationElementForExtension(
            "org.jpox.store_connectionfactory",
            new String[] {"datastore", "transactional"}, new String[] {storeManagerKey, "true"});
        if (cfElem != null)
        {
            txConnectionFactoryName = cfElem.getAttribute("name");
            try
            {
                ConnectionFactory cf = (ConnectionFactory)omfContext.getPluginManager().createExecutableExtension(
                    "org.jpox.store_connectionfactory",
                    new String[] {"datastore", "transactional"},
                    new String[] {storeManagerKey, "true"}, "class-name",
                    new Class[] {OMFContext.class, String.class},
                    new Object[] {omfContext, "tx"});
                omfContext.getConnectionFactoryRegistry().registerConnectionFactory(txConnectionFactoryName, cf);
                if (JPOXLogger.CONNECTION.isDebugEnabled())
                {
                    JPOXLogger.CONNECTION.debug(LOCALISER.msg("032018", txConnectionFactoryName));
                }
            }
            catch (Exception e)
            {
                throw new JPOXException("Error creating transactional connection factory", e).setFatal();
            }
        }
        else
        {
            throw new JPOXException("Error creating transactional connection factory. No connection factory plugin defined");
        }

        // Factory for connections - nontransactional
        cfElem = omfContext.getPluginManager().getConfigurationElementForExtension(
            "org.jpox.store_connectionfactory",
            new String[] {"datastore", "transactional"}, new String[] {storeManagerKey, "false"});
        if (cfElem != null)
        {
            nontxConnectionFactoryName = cfElem.getAttribute("name");
            try
            {
                ConnectionFactory cf = (ConnectionFactory)omfContext.getPluginManager().createExecutableExtension(
                    "org.jpox.store_connectionfactory",
                    new String[] {"datastore", "transactional"},
View Full Code Here

Examples of org.jpox.plugin.ConfigurationElement

     * @param strategy The strategy
     * @return Whether it is supported.
     */
    public boolean supportsValueStrategy(String strategy)
    {
        ConfigurationElement elem =
            omfContext.getPluginManager().getConfigurationElementForExtension(
                "org.jpox.store_valuegenerator",
                new String[]{"name", "unique"},
                new String[] {strategy, "true"});
        if (elem != null)
View Full Code Here

Examples of org.jpox.plugin.ConfigurationElement

        // Others are per class/field. Others have a user-defined name.
        // The name that they are cached under relates to what they use.
        // Generate the name for PoidManager to use the strategy for this field/class.
        String poidGeneratorName = null;
        String generatorNameKeyInManager = null;
        ConfigurationElement elem =
            omfContext.getPluginManager().getConfigurationElementForExtension("org.jpox.store_valuegenerator",
                new String[]{"name", "unique"}, new String[] {strategyName, "true"});
        if (elem != null)
        {
            // Unique value generator so set the key in PoidManager to the value generator name itself
            poidGeneratorName = elem.getAttribute("name");
            generatorNameKeyInManager = poidGeneratorName;
        }
        else
        {
            // Not a unique (datastore-independent) generator so try just for this datastore
            elem = omfContext.getPluginManager().getConfigurationElementForExtension("org.jpox.store_valuegenerator",
                new String[]{"name", "datastore"}, new String[] {strategyName, storeManagerKey});
            if (elem != null)
            {
                // Set the generator name (for use by the PoidManager)
                poidGeneratorName = elem.getAttribute("name");
            }
        }
        if (generatorNameKeyInManager == null)
        {
            // Value generator is not unique so set based on class/field
            if (absoluteFieldNumber >= 0)
            {
                // Require generation for a field so use field name for the generator symbolic name
                generatorNameKeyInManager = mmd.getFullFieldName();
            }
            else
            {
                // Require generation for a datastore id field so use the class name for the generator symbolic name
                generatorNameKeyInManager = cmd.getFullClassName();
            }
        }

        // Try to find the generator from the PoidManager if we already have it managed
        PoidGenerator generator = poidManager.getPoidGenerator(generatorNameKeyInManager);
        if (generator == null)
        {
            if (poidGeneratorName == null)
            {
                // No available value-generator for the specified strategy for this datastore
                throw new JPOXUserException(LOCALISER.msg("038004", strategy));
            }

            // Set up the default properties available for all value generators
            Properties props = getPropertiesForGenerator(cmd, absoluteFieldNumber, om, sequenceMetaData,
                tableGeneratorMetaData);

            Class cls = null;
            if (elem != null)
            {
                cls = omfContext.getPluginManager().loadClass(elem.getExtension().getPlugin().getSymbolicName(),
                    elem.getAttribute("class-name"));
            }
            if (cls == null)
            {
                throw new JPOXException("Cannot create Poid Generator for strategy " + poidGeneratorName);
            }
View Full Code Here

Examples of org.jpox.plugin.ConfigurationElement

            // Create if not already present
            String implCreatorName = persistenceConfig.getStringProperty("org.jpox.implementationCreatorName");
            try
            {
                Class cls = null;
                ConfigurationElement elem =
                    getPluginManager().getConfigurationElementForExtension("org.jpox.implementation_creator",
                        "name", implCreatorName);
                if (elem != null)
                {
                    try
                    {
                        cls = Class.forName(elem.getAttribute("class-name"), true,
                            ObjectManagerFactoryImpl.class.getClassLoader());
                        ic = (ImplementationCreator)cls.newInstance();
                    }
                    catch (Exception e)
                    {
View Full Code Here

Examples of org.jpox.plugin.ConfigurationElement

                this.mconn = null;
            }
        };

        Class cls = null;
        ConfigurationElement elem =
            objectMgr.getOMFContext().getPluginManager().getConfigurationElementForExtension(
                "org.jpox.store_valuegenerator",
                new String[]{"name", "datastore"},
                new String[] {poidGeneratorName, storeManager.getStoreManagerKey()});
        if (elem != null)
        {
            cls = objectMgr.getOMFContext().getPluginManager().loadClass(
                elem.getExtension().getPlugin().getSymbolicName(), elem.getAttribute("class-name"));
        }
        if (cls == null)
        {
            throw new JPOXException("Cannot create Poid Generator for strategy "+poidGeneratorName);
        }
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.