Package ro.fortsoft.pf4j

Examples of ro.fortsoft.pf4j.PluginState


    PluginWrapper pluginWrapper = pf4j.getPlugin(pluginId);
    if (pluginWrapper.getPlugin() instanceof GitblitPlugin) {
      ((GitblitPlugin) pluginWrapper.getPlugin()).onInstall();
    }

    PluginState state = pf4j.startPlugin(pluginId);
    return PluginState.STARTED.equals(state);
  }
View Full Code Here


      PluginWrapper pluginWrapper = pf4j.getPlugin(newPluginId);
      if (pluginWrapper.getPlugin() instanceof GitblitPlugin) {
        ((GitblitPlugin) pluginWrapper.getPlugin()).onUpgrade(oldVersion);
      }

      PluginState state = pf4j.startPlugin(newPluginId);
      return PluginState.STARTED.equals(state);
    } else {
      logger.error("Failed to delete plugin {}", pluginId);
    }
    return false;
View Full Code Here

        PluginWrapper pluginWrapper = getPlugin(id);
        if (pluginWrapper == null) {
          throw new UnloggedFailure(String.format("Plugin %s is not installed!", id));
        }

        PluginState state = gitblit.startPlugin(pluginWrapper.getPluginId());
        if (PluginState.STARTED.equals(state)) {
          stdout.println(String.format("Started %s", pluginWrapper.getPluginId()));
        } else {
          throw new UnloggedFailure(1, String.format("Failed to start %s", pluginWrapper.getPluginId()));
        }
View Full Code Here

        PluginWrapper pluginWrapper = getPlugin(id);
        if (pluginWrapper == null) {
          throw new UnloggedFailure(String.format("Plugin %s is not installed!", id));
        }

        PluginState state = gitblit.stopPlugin(pluginWrapper.getPluginId());
        if (PluginState.STOPPED.equals(state)) {
          stdout.println(String.format("Stopped %s", pluginWrapper.getPluginId()));
        } else {
          throw new UnloggedFailure(1, String.format("Failed to stop %s", pluginWrapper.getPluginId()));
        }
View Full Code Here

    PluginWrapper pluginWrapper = pf4j.getPlugin(pluginId);
    if (pluginWrapper.getPlugin() instanceof GitblitPlugin) {
      ((GitblitPlugin) pluginWrapper.getPlugin()).onInstall();
    }

    PluginState state = pf4j.startPlugin(pluginId);
    return PluginState.STARTED.equals(state);
  }
View Full Code Here

      PluginWrapper pluginWrapper = pf4j.getPlugin(newPluginId);
      if (pluginWrapper.getPlugin() instanceof GitblitPlugin) {
        ((GitblitPlugin) pluginWrapper.getPlugin()).onUpgrade(oldVersion);
      }

      PluginState state = pf4j.startPlugin(newPluginId);
      return PluginState.STARTED.equals(state);
    } else {
      logger.error("Failed to delete plugin {}", pluginId);
    }
    return false;
View Full Code Here

TOP

Related Classes of ro.fortsoft.pf4j.PluginState

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.