Examples of PluginEntryPoint


Examples of org.vosao.business.plugin.PluginEntryPoint

  @Override
  public PluginServiceManager getFrontServices(PluginEntity plugin)
      throws ClassNotFoundException, InstantiationException,
      IllegalAccessException {
    PluginEntryPoint entryPoint = getEntryPoint(plugin);
    return entryPoint == null ? null : entryPoint.getPluginFrontService();
  }
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

        resetPlugin(plugin);
        ClassLoader pluginClassLoader = getPluginClassLoaderFactory()
          .getClassLoader(plugin.getName());
        Class entryPointClass = pluginClassLoader
          .loadClass(plugin.getEntryPointClass());
        PluginEntryPoint entryPoint = (PluginEntryPoint)entryPointClass
          .newInstance();
        entryPoint.setBusiness(getBusiness());
        entryPoint.setFrontService(getFrontService());
        entryPoint.setBackService(getBackService());
        entryPoint.init();
        plugins.put(plugin.getName(), entryPoint);
        pluginTimestamps.put(plugin.getName(), plugin);
        getBusiness().getRewriteUrlBusiness().addRules(
            entryPoint.getRewriteRules());
      }
      catch (ClassNotFoundException e) {
        logger.error("Class not found " + e.getMessage());
      }
      catch (Exception e) {
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

    PluginEntity plugin = getDao().getPluginDao().getByName(pluginName);
    if (plugin == null || plugin.isDisabled()) {
      return null;
    }
    try {
      PluginEntryPoint entryPoint = getEntryPoint(plugin);
      return entryPoint == null ? null :
        entryPoint.getServlets().get(servlet);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

  }

  @Override
  public void cronSchedule(Date date) {
    for (PluginEntity plugin : getDao().getPluginDao().selectEnabled()) {
      PluginEntryPoint entry = getBusiness().getPluginBusiness()
          .getEntryPoint(plugin);
      if (entry == null) {
        return;
      }
      for (PluginCronJob job : entry.getJobs()) {
        try {
          if (job.isShowTime(date)) {
            job.run();
          }
        }
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

 
  @Override
  public Object getVelocityPlugin(PluginEntity plugin)
      throws ClassNotFoundException, InstantiationException,
      IllegalAccessException {
    PluginEntryPoint entryPoint = getEntryPoint(plugin);
    return entryPoint == null ? null : entryPoint.getPluginVelocityService();
  }
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

  @Override
  public PluginServiceManager getBackServices(PluginEntity plugin)
      throws ClassNotFoundException, InstantiationException,
      IllegalAccessException {
    PluginEntryPoint entryPoint = getEntryPoint(plugin);
    return entryPoint== null ? null : entryPoint.getPluginBackService();
  }
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

  private List<ResourceBundle> getResourceBundles() {
    List<ResourceBundle> result = new ArrayList<ResourceBundle>();
    for (PluginEntity plugin : getBusiness().getDao().getPluginDao()
        .selectEnabled()) {
      PluginEntryPoint entryPoint = getBusiness().getPluginBusiness()
          .getEntryPoint(plugin);
      if (entryPoint != null && entryPoint.getBundleName() != null) {
        result.add(ResourceBundle.getBundle(
            entryPoint.getBundleName(),
            locale,
            getBusiness().getPluginBusiness().getClassLoader(plugin)));
      }
    }
    result.add(ResourceBundle.getBundle(BUNDLE_NAME, locale));
View Full Code Here

Examples of org.vosao.business.plugin.PluginEntryPoint

  @Override
  public String get(Business business, PageEntity page) {
    StringBuffer code = new StringBuffer();
    for (PluginEntity plugin : business.getDao().getPluginDao()
        .selectEnabled()) {
      PluginEntryPoint entryPoint = business.getPluginBusiness()
          .getEntryPoint(plugin);
      if (entryPoint == null) continue;
      if (entryPoint.isHeadInclude()) {
        entryPoint.setHeadInclude(false);
        if (!StringUtils.isEmpty(plugin.getPageHeader())) {
          code.append(plugin.getPageHeader());
        }
      }
      code.append(entryPoint.getHeadBeginInclude());
    }
    return code.toString();
  }
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.