Examples of PluginManager


Examples of org.apache.wiki.api.engine.PluginManager

    private String executePlugin( String plugin, String args, String body )
        throws PluginException, IOException
    {
        WikiEngine engine = m_wikiContext.getEngine();
        PluginManager pm  = engine.getPluginManager();

        m_evaluated = true;

        Map<String, String> argmap = pm.parseArgs( args );
       
        if( body != null )
        {
            argmap.put( "_body", body );
        }

        String result = pm.execute( m_wikiContext, plugin, argmap );

        return result;       
    }
View Full Code Here

Examples of org.apache.wiki.plugin.PluginManager

    testEngine.saveText( "TestPage01", "Some Text for testing 01" );
    testEngine.saveText( "TestPage02", "Some Text for testing 02" );
    testEngine.saveText( "TestPage03", "Some Text for testing 03" );

    manager = new PluginManager( testEngine, props );
}
View Full Code Here

Examples of org.b3log.latke.plugin.PluginManager

     */
    public JSONObject setPluginStatus(final String pluginId, final String status) {
        final Map<String, String> langs =
                langPropsService.getAll(Latkes.getLocale());

        final PluginManager pluginManager = PluginManager.getInstance();
        final List<AbstractPlugin> plugins = pluginManager.getPlugins();

        final JSONObject ret = new JSONObject();

        for (final AbstractPlugin plugin : plugins) {
            if (plugin.getId().equals(pluginId)) {
                final Transaction transaction =
                        pluginRepository.beginTransaction();
                try {
                    plugin.setStatus(PluginStatus.valueOf(status));

                    pluginRepository.update(pluginId, plugin.toJSONObject());

                    transaction.commit();

                    pluginManager.update(plugin);

                    ret.put(Keys.STATUS_CODE, true);
                    ret.put(Keys.MSG, langs.get("setSuccLabel"));

                    return ret;
View Full Code Here

Examples of org.bukkit.plugin.PluginManager

      this.getServer().getPluginManager().disablePlugin(this);
      return;
    }

    // Register events
    PluginManager pm = this.getServer().getPluginManager();
    pm.registerEvents(this.playerListener, this);
    pm.registerEvents(this.entityListener, this);
    pm.registerEvents(this.blockListener, this);
    pm.registerEvents(this.serverListener, this);
    if (pm.isPluginEnabled("TagAPI")) {
      try {
        Class.forName("org.kitteh.tag.TagAPI");
        pm.registerEvents(new WarTagListener(), this);
        this.tagServer = true;
      } catch (ClassNotFoundException e) {
        this.tagServer = false;
      }
    }
View Full Code Here

Examples of org.bukkit.plugin.PluginManager

        // Bind the /ma, /mobarena commands to MACommands.
        commandHandler = new CommandHandler(this);
        getCommand("ma").setExecutor(commandHandler);
        getCommand("mobarena").setExecutor(commandHandler);
       
        PluginManager pm = this.getServer().getPluginManager();
        pm.registerEvents(new MAGlobalListener(this, arenaMaster), this);
    }
View Full Code Here

Examples of org.bukkit.plugin.PluginManager

    public void saveConfig() {
        plugin.saveConfig();
    }

    private Permission registerPermission(String permString, PermissionDefault value) {
        PluginManager pm = plugin.getServer().getPluginManager();

        Permission perm = pm.getPermission(permString);
        if (perm == null) {
            perm = new Permission(permString);
            perm.setDefault(value);
            pm.addPermission(perm);
        }
        return perm;
    }
View Full Code Here

Examples of org.bukkit.plugin.PluginManager

        worlds.add(s.toLowerCase());
      }
    }
    debug = config.getBoolean("Plugin.Debug", false);

    PluginManager pm = getServer().getPluginManager();
    pm.registerEvents(new MobListener(this), this);
    pm.registerEvents(new TomeListener(this), this);
    pm.registerEvents(new SocketListener(this), this);
    pm.registerEvents(new EffectsListener(this), this);
    pm.registerEvents(new SetListener(this), this);

    getCommand("diablodrops").setExecutor(new DiabloDropCommand(this));

    ShapelessRecipe re = new ShapelessRecipe(new IdentifyTome());
    re.addIngredient(3, Material.BOOK);
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

    public void initialiseTypes(StoreSchemaHandler handler, ManagedConnection mconn)
    {
        // Initialise the mappings available. Load all possible, and remove unsupported for this datastore
        RDBMSStoreManager storeMgr = (RDBMSStoreManager)handler.getStoreManager();
        ClassLoaderResolver clr = storeMgr.getNucleusContext().getClassLoaderResolver(null);
        PluginManager pluginMgr = storeMgr.getNucleusContext().getPluginManager();
        MappingManager mapMgr = storeMgr.getMappingManager();
        mapMgr.loadDatastoreMapping(pluginMgr, clr, getVendorID());

        // Load the types from plugin(s)
        handler.getSchemaData(mconn.getConnection(), "types", null);
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

    public SQLExpressionFactory(RDBMSStoreManager storeMgr)
    {
        this.storeMgr = storeMgr;
        this.clr = storeMgr.getNucleusContext().getClassLoaderResolver(null);

        PluginManager pluginMgr = storeMgr.getNucleusContext().getPluginManager();
        ConfigurationElement[] methodElems =
            pluginMgr.getConfigurationElementsForExtension("org.datanucleus.store.rdbms.sql_method", null, null);
        if (methodElems != null)
        {
            for (int i=0;i<methodElems.length;i++)
            {
                String datastoreName = methodElems[i].getAttribute("datastore");
                String className = methodElems[i].getAttribute("class");
                String methodName = methodElems[i].getAttribute("method").trim();
                String sqlMethodName = methodElems[i].getAttribute("evaluator").trim();

                String key = getSQLMethodKey(datastoreName, className, methodName);
                methodClassByDatastoreMethodName.put(key, sqlMethodName);
            }
        }

        ConfigurationElement[] operationElems =
            pluginMgr.getConfigurationElementsForExtension("org.datanucleus.store.rdbms.sql_operation", null, null);
        if (operationElems != null)
        {
            for (int i=0;i<operationElems.length;i++)
            {
                String datastoreName = operationElems[i].getAttribute("datastore");
View Full Code Here

Examples of org.datanucleus.plugin.PluginManager

    protected void setUp() throws Exception
    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        Properties props = new Properties();
        props.setProperty("bundle-check-action", "EXCEPTION");
        PluginManager pluginMgr = new PluginManager(null, clr, props);

        typeMgr = new TypeManager(null, pluginMgr, clr);
    }
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.