Package org.jnode.plugin

Examples of org.jnode.plugin.PluginManager


 
    @Override
    public void doComplete(CompletionInfo completions, String partial, int flags) {
        try {
            // get the plugin manager
            final PluginManager piMgr = InitialNaming.lookup(PluginManager.NAME);

            // collect matching plugin id's
            for (PluginDescriptor descr : piMgr.getRegistry()) {
                final String id = descr.getId();
                if (id.startsWith(partial)) {
                    completions.addCompletion(id);
                }
            }
View Full Code Here


        refresh();
    }

    public void refresh() {
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            PluginDescriptorModel pdm =
                    (PluginDescriptorModel) mgr.getRegistry().getPluginDescriptor(id);
            if (pdm != null) {

                buffer = pdm.getJarFile().getBuffer();
                isvalid = buffer != null;
            } else {
View Full Code Here

        refresh();
    }

    public void refresh() {
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            PluginDescriptorModel pdm =
                    (PluginDescriptorModel) mgr.getRegistry().getPluginDescriptor(pluginId);
            if (pdm != null) {
                isvalid = false;
                for (PluginDescriptorModel fdm : pdm.fragments()) {
                    if (fdm.getId().equals(fragmentId)) {
                        buffer = fdm.getJarFile().getBuffer();
View Full Code Here

    }

    public void refresh() {
        super.refresh();
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            final PluginDescriptor descr = mgr.getRegistry().getPluginDescriptor(name);
            if (descr != null) {
                addStringln("Name:");
                addStringln("\t" + descr.getId());
                addStringln("Provider:");
                addStringln("\t" + descr.getProviderName());
View Full Code Here

        // just add new ones and delete old ones
        // now it does delete all files and (re)create all ones
        super.clear();
        final ArrayList<String> rows = new ArrayList<String>();
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            for (PluginDescriptor descr : mgr.getRegistry()) {
                String id = descr.getId();
                rows.add(id);
                List<?> fragments = ((PluginDescriptorModel) descr).fragments();
                if (fragments.size() > 0) {
                    for (Object o : fragments) {
View Full Code Here

        // just add new ones and delete old ones
        // now it does delete all files and (re)create all ones
        super.clear();
        final ArrayList<String> rows = new ArrayList<String>();
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            for (PluginDescriptor descr : mgr.getRegistry()) {
                rows.add(descr.getId());
            }
            Collections.sort(rows);
            for (Object row : rows) {
                final JIFSFile F = new JIFSFplugin(row.toString(), this);
View Full Code Here

        super("Manage the JIFS filesystem plugin");
        registerArguments(ARG_ACTION);
    }

    public void execute() throws NameNotFoundException, PluginException {
        final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
        final Plugin p =
            mgr.getRegistry().getPluginDescriptor("org.jnode.fs.jifs.def").getPlugin();
        switch (ARG_ACTION.getValue()) {
            case start:
                p.start();
                break;
            case stop:
View Full Code Here

            TestEmu.loadPseudoPlugin(id, plugin.getClassName());
        } else {
            String ver = (plugin.getPluginVersion().length() == 0) ?
                    System.getProperty("os.version") : plugin.getPluginVersion();
            try {
                PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
                PluginRegistry reg = mgr.getRegistry();
                if (reg.getPluginDescriptor(id) == null) {
                    reg.loadPlugin(mgr.getLoaderManager(), new PluginReference(id, new Version(ver)), true);
                }
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                throw new TestRunnerException(
                        "Cannot load plugin '" + plugin.getPluginId() + "/" + ver + "'", ex);
View Full Code Here

     * @see org.jnode.system.repository.RepositoryPlugin#start()
     */
    @Override
    protected void start() {
        try {
            final PluginManager pm;
            pm = InitialNaming.lookup(PluginManager.NAME);
            registry = pm.getRegistry();
        } catch (NameNotFoundException ex) {
            log.error("Cannot find PluginManager; PluginLoader not installed");
        }
    }
View Full Code Here

            final String pluginLoaderURL = new String(pluginLoaderValue, "UTF8");
            log.info("Got plugin loader url : " + pluginLoaderURL);
            AccessController.doPrivileged(new PrivilegedAction<Object>() {
                public Object run() {
                    try {
                        final PluginManager pm = InitialNaming.lookup(PluginManager.class);
                        pm.getLoaderManager().addPluginLoader(new URLPluginLoader(new URL(pluginLoaderURL)));
                    } catch (Throwable ex) {
                        log.error("Failed to configure plugin loader");
                        log.debug("Failed to configure plugin loader", ex);
                    }
                    return null;
View Full Code Here

TOP

Related Classes of org.jnode.plugin.PluginManager

Copyright © 2018 www.massapicom. 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.