Package hudson

Examples of hudson.PluginManager$PluginInstanceStore


         * If some version of this plugin is currently installed, return {@link PluginWrapper}.
         * Otherwise null.
         */
        @Exported
        public PluginWrapper getInstalled() {
            PluginManager pm = Jenkins.getInstance().getPluginManager();
            return pm.getPlugin(name);
        }
View Full Code Here


    public boolean dynamicLoad;

    protected int run() throws Exception {
        Jenkins h = Jenkins.getInstance();
        h.checkPermission(Jenkins.ADMINISTER);
        PluginManager pm = h.getPluginManager();

        for (String source : sources) {
            // is this a file?
            if (channel!=null) {
                FilePath f = new FilePath(channel, source);
                if (f.exists()) {
                    stdout.println(Messages.InstallPluginCommand_InstallingPluginFromLocalFile(f));
                    if (name==null)
                        name = f.getBaseName();
                    f.copyTo(getTargetFilePath());
                    if (dynamicLoad)
                        pm.dynamicLoad(getTargetFile());
                    continue;
                }
            }

            // is this an URL?
            try {
                URL u = new URL(source);
                stdout.println(Messages.InstallPluginCommand_InstallingPluginFromUrl(u));
                if (name==null) {
                    name = u.getPath();
                    name = name.substring(name.lastIndexOf('/')+1);
                    name = name.substring(name.lastIndexOf('\\')+1);
                    int idx = name.lastIndexOf('.');
                    if (idx>0name = name.substring(0,idx);
                }
                getTargetFilePath().copyFrom(u);
                if (dynamicLoad)
                    pm.dynamicLoad(getTargetFile());
                continue;
            } catch (MalformedURLException e) {
                // not an URL
            }
View Full Code Here

        HudsonModule.plugins = checkNotNull(plugins);
    }

    @Provides
    private PluginManager getPluginManager() {
        PluginManager target = plugins != null ? plugins : getHudson().getPluginManager();
        checkState(target !=null);
        return target;
    }
View Full Code Here

        /**
         * If some version of this plugin is currently installed, return {@link PluginWrapper}.
         * Otherwise null.
         */
        public PluginWrapper getInstalled() {
            PluginManager pm = Hudson.getInstance().getPluginManager();
            return pm.getPlugin(name);
        }
View Full Code Here

TOP

Related Classes of hudson.PluginManager$PluginInstanceStore

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.