Package pt.webdetails.cpf.plugins

Examples of pt.webdetails.cpf.plugins.PluginsAnalyzer


    pluginPool = new Hashtable<String, String>();

    /* xaction case is added manually because it doesnt need a plugin to be runnable */
    pluginPool.put( "xaction", "ViewAction?solution={solution}&path={path}&action={name}" );

    List<Plugin> installedPlugins = new PluginsAnalyzer().getInstalledPlugins();

    if ( installedPlugins == null ) {
      logger.error( "PluginCatalogEngine found zero installed plugins" );
      return;
    }
View Full Code Here


    for (PathOrigin origin: CdeSettings.getCustomComponentLocations()){
        customComponentDirectories.add(origin);
    }

    // External component locations
    PluginsAnalyzer pluginsAnalyzer =
        new PluginsAnalyzer(CdeEnvironment.getContentAccessFactory(), PentahoSystem.get(IPluginManager.class));
    pluginsAnalyzer.refresh();

    // FIXME will fail often if not everytime
    for (PluginPair<List<Element>> entry : pluginsAnalyzer.getPluginsWithSection("/cde-components/path")) {
      for (Element pathNode : entry.getValue()) {
        String path = StringUtils.strip( pathNode.getStringValue() );
        String origin = pathNode.attributeValue("origin");//TODO:hcoded
        if (StringUtils.isEmpty(origin)) {
          //FIXME:
View Full Code Here

  public String getCdePlugins(){
   
    JSONArray pluginsArray = new JSONArray();
 
  PluginsAnalyzer pluginsAnalyzer = new PluginsAnalyzer(CdeEnvironment.getContentAccessFactory(), PentahoSystem.get(IPluginManager.class));
    pluginsAnalyzer.refresh();

    IPluginFilter pluginFilter = new IPluginFilter() {
      public boolean include(Plugin plugin) {
        boolean include = false;
        if(plugin.hasSettingsXML()) {
          include = (plugin.getXmlValue("/settings/cde-compatible", "settings.xml").equals("true")) ? true : false;
        }
        return include;
      }
    };

    List<Plugin> cdePlugins = pluginsAnalyzer.getPlugins(pluginFilter);
    // TODO: plugin is json serializable...
    for(Plugin plugin : cdePlugins) {
      try {
        JSONObject pluginObject = new JSONObject();
        pluginObject.put("title", plugin.getId());
View Full Code Here

   */
  private List<DataSourceProvider> readProviders() {
 
  List<DataSourceProvider> dataSourceProviders = new ArrayList<DataSourceProvider>();
   
    PluginsAnalyzer pluginsAnalyzer = new PluginsAnalyzer(CdeEnvironment.getContentAccessFactory(), PentahoSystem.get(IPluginManager.class));
    pluginsAnalyzer.refresh();

    List<PluginsAnalyzer.PluginWithEntity> pluginsWithEntity = pluginsAnalyzer.getRegisteredEntities("/" + CDE_DATASOURCE_IDENTIFIER);

    for(PluginsAnalyzer.PluginWithEntity entity : pluginsWithEntity) {
      String provider = entity.getPlugin().getId();

      try {
View Full Code Here

    style = new Style( CdeEnvironment.getPluginSystemReader(), SYSTEM_RESOURCE_STYLES_DIR, null );
    styles.add( style );
    style = new Style( CdeEnvironment.getPluginRepositoryReader(), RESOURCE_STYLES_DIR_SOLUTION, null );
    styles.add( style );

    PluginsAnalyzer pluginsAnalyzer =
        new PluginsAnalyzer( CdeEnvironment.getContentAccessFactory(), PentahoSystem.get( IPluginManager.class ) );
    pluginsAnalyzer.refresh();

    List<PluginsAnalyzer.PluginWithEntity> entities = pluginsAnalyzer.getRegisteredEntities( "/cde-styles" );

    for ( PluginsAnalyzer.PluginWithEntity entity : entities ) {

      String pluginStylesDir = entity.getRegisteredEntity().valueOf( "path" );
      String finalPath = pluginStylesDir + "/";
View Full Code Here

    if ( split.length > 1 ) {
      String pluginId = split[1].replace( "(", "" ).replace( ")", "" );

      styleFilename = split[0] + ".html";

      PluginsAnalyzer pluginsAnalizer = new PluginsAnalyzer();
      pluginsAnalizer.refresh();

      List<Plugin> plugins = pluginsAnalizer.getInstalledPlugins();

      for ( Plugin plugin : plugins ) {
        if ( plugin.getId().equalsIgnoreCase( pluginId ) ) {
          stylePath = "/" + plugin.getRegisteredEntities( "/cde-styles" ).valueOf( "path" ) + "/" + styleFilename;
          break;
View Full Code Here

TOP

Related Classes of pt.webdetails.cpf.plugins.PluginsAnalyzer

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.