Examples of PluginContext


Examples of de.odysseus.calyxo.control.PluginContext

   * @param context
   * @throws ServletException
   */
  public void init(ModuleContext context) throws ServletException {
    this.context = context;
    this.pluginContext = new PluginContext(context, DefaultAction.class, new DefaultDispatcher(context));

    try {
      initI18n();
    } catch (Exception e) {
      throw new ServletException("Could not initialize i18n", e);
View Full Code Here

Examples of org.crsh.plugin.PluginContext

    try {
      URI uri = wsSession.getRequestURI();
      String path = uri.getPath();
      log.fine("Establishing session for " + path);
      String contextPath = path.substring(0, path.lastIndexOf('/'));
      PluginContext context = WebPluginLifeCycle.getPluginContext(contextPath);
      if (context != null) {
        Boolean enabled = context.getProperty(WebPlugin.ENABLED);
        if (enabled != null && enabled) {
          log.fine("Using shell " + context);
          ShellFactory factory = context.getPlugin(ShellFactory.class);
          Principal user = wsSession.getUserPrincipal();
          Shell shell = factory.create(user);
          CRaSHSession session = new CRaSHSession(wsSession, shell);
          sessions.put(wsSession.getId(), session);
          log.fine("Established session " + wsSession.getId());
View Full Code Here

Examples of org.crsh.plugin.PluginContext

        throw new IllegalArgumentException("Wrong root directory argument " + root.getCanonicalPath());
      }
    }
    FS cmdFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/commands/"));
    FS confFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/"));
    PluginContext ctx = new PluginContext(
      new ServiceLoaderDiscovery(Thread.currentThread().getContextClassLoader()),
      Collections.<String, Object>emptyMap(),
      cmdFS,
      confFS,
      Thread.currentThread().getContextClassLoader());
    ctx.refresh();
    CRaSH crash = new CRaSH(ctx);
    StringBuilder buffer = new StringBuilder();
    for (Map.Entry<String, String> s : crash.getCommands()) {
      Command<?> cmd = crash.getCommand(s.getKey());
      CommandDescriptor<?> desc = cmd.getDescriptor();
View Full Code Here

Examples of org.crsh.plugin.PluginContext

    return this;
  }

  @Override
  public void init() {
    PluginContext context = getContext();
    this.username = context.getProperty(SIMPLE_USERNAME);
    this.password = context.getProperty(SIMPLE_PASSWORD);
  }
View Full Code Here

Examples of org.crsh.plugin.PluginContext

      PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(
          this.resourceLoader.getClassLoader(), this.beanFactory,
          this.properties.getDisabledPlugins());

      PluginContext context = new PluginContext(discovery,
          createPluginContextAttributes(), commandFileSystem,
          configurationFileSystem, this.resourceLoader.getClassLoader());

      context.refresh();
      start(context);
    }
View Full Code Here

Examples of org.crsh.plugin.PluginContext

    this.context.register(SecurityConfiguration.class);
    this.context.register(CrshAutoConfiguration.class);
    this.context.refresh();

    PluginLifeCycle lifeCycle = this.context.getBean(PluginLifeCycle.class);
    PluginContext pluginContext = lifeCycle.getContext();

    int count = 0;
    Iterator<AuthenticationPlugin> plugins = pluginContext.getPlugins(
        AuthenticationPlugin.class).iterator();
    while (plugins.hasNext()) {
      count++;
      plugins.next();
    }
View Full Code Here

Examples of org.crsh.plugin.PluginContext

    // The service loader discovery
    ServiceLoaderDiscovery discovery = new ServiceLoaderDiscovery(loader);

    //
    PluginContext context = new PluginContext(
      discovery,
      attributes,
      cmdFS,
      confFS,
      loader);

    //
    context.refresh();

    //
    start(context);
  }
View Full Code Here

Examples of org.crsh.plugin.PluginContext

  public CRaSHShellFactory() {
  }

  @Override
  public void init() {
    PluginContext context = getContext();
    crash = new CRaSH(context);
  }
View Full Code Here

Examples of org.rhq.core.pluginapi.plugin.PluginContext

        String pluginName = pluginEnvironment.getPluginName();

        // tell the plugin we have loaded it
        PluginLifecycleListener overseer = getPluginLifecycleListener(pluginName, pluginEnvironment, pluginDescriptor);
        if (overseer != null) {
            PluginContext context = createPluginContext(pluginName);
            ClassLoader originalContextClassLoader = Thread.currentThread().getContextClassLoader();
            try {
                Thread.currentThread().setContextClassLoader(classLoader);
                overseer.initialize(context);
            } catch (Throwable t) {
View Full Code Here

Examples of org.rhq.core.pluginapi.plugin.PluginContext

        SystemInfo sysInfo = SystemInfoFactory.createSystemInfo();
        File dataDir = new File(pluginContainerConfiguration.getDataDirectory(), pluginName);
        File tmpDir = pluginContainerConfiguration.getTemporaryDirectory();
        String pcName = pluginContainerConfiguration.getContainerName();

        PluginContext context = new PluginContext(pluginName, sysInfo, tmpDir, dataDir, pcName);
        return context;
    }
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.