java - Pentaho 5 BI 服务器 gwt 插件

标签 java gwt plugins pentaho

我正在更新一个在 BI 3.x-4.x 中正常运行的 gwt 插件。我在代码中做了一些更正,现在插件能够在存储库中保存/加载其数据,并在我在浏览器中输入 url 时加载其状态

http://localhost:8080/pentaho/content/stdashboard?path=/home/admin&action=test2.std&mode=view#dashboard

首先,我注意到,可能内容类型的操作中的操作不会执行任何操作,并且我使用了稍后在plugin.xml和plugin.spring.xml中引用的透视图。

运行应用程序时生成的 url 为

http://localhost:8080/pentaho/api/repos/:home:admin:test2.std/run?ts=1395256028350

在我的 ContentGenerator 中(类我收到的路径值为“/home/admin/test2.std”,根据此版本,这是可以的,但我认为我丢失了或做错了一些事情,因为 GWT-WS 不是仅 ContexGenerator 被调用。

当我在浏览器中输入 url 时,应用程序首先执行 ContentGenerator,然后执行 WS,然后再次执行 ConntextGenerator。

插件.xml

<plugin title='STDashboard Pentaho Plugin' loader="OVERRIDING" name="stdashboard">
  <webservice id="olapInteraction" type="gwt" 
      class="com.stratebi.stdashboard.server.OlapInteractionImplLite"/>
  <content-type type="std" mime-type="text/html">
    <title>STDashboard Plugin</title>
    <description>STDashboard configuration file</description>
    <icon-url>content/stdashboard-res/stdashboard_16.jpg</icon-url>
    <meta-provider>com.stratebi.stdashboard.STDashboardContentTypeMetaProvider</meta-provider>
    <operations>
      <operations>
        <operation>
        <id>RUN</id>
        <perspective>run</perspective>
      </operation>
    </operations>
  </content-type>
  <content-generator id="std" title="STDashboard" type="std.run"
      class="com.stratebi.stdashboard.STDashboardContentGenerator"/>
    <static-paths>
      <static-path url="/stdashboard-res" localFolder="resources"/>
    </static-paths>
  <overlays>
    <overlay id="startup.STDashboardPlugin" 
         resourcebundle="content/stdashboard-res/stdashboard">
      <button id="openSTDashboard" label="${stdashboard.tooltip}" 
              command="Home.openFile('STDashboard','STDashboard',
              'content/stdashboard?solution=system&amp;path=temp&amp;action=true');
              $('#btnCreateNew').popover('hide')" />
    </overlay>
    <overlay id="launch" resourcebundle="content/stdashboard-res/stdashboard">
          <button id="stdashboardButton" image="content/stdashboard-res/stdashboard.png"
              command="Home.openFile('STDashboard','STDashboard',
              'content/stdashboard?solution=system&amp;path=temp&amp;action=true')"
              label="${stdashboard.tooltip}" />
        </overlay>
    </overlays>
</plugin>

plugin.spring.xml

<beans "namespaces list...">
  <context:annotation-config />
  <bean id="stdashboard" 
        class="com.stratebi.stdashboard.STDashboardContentGenerator" scope="prototype"/>
  <bean id="stdashboard.run" 
        class="com.stratebi.stdashboard.STDashboardContentGenerator" scope="prototype"/>
</beans>

提前致谢

最佳答案

不确定它是否有帮助,但我会研究使用 Jersey 通过 Rest Endpoints 公开功能。

这样你只需要在plugin.spring.xml中声明你的端点并使用它们调用

/pentaho/plugin/<your plugin>/<whatever urls you decide to create>

我们在 webdetails 中使用的经验法则是,如果您要生成基于文件的内容以向用户显示,请使用内容生成器和 api/repos/...../<run or edit or generatedContent>.

如果您要公开将由您的插件使用的服务,请将 REST 端点与 Jersey 资源结合使用。

关于java - Pentaho 5 BI 服务器 gwt 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22615887/

相关文章:

java - (错误)无法找到或加载主类

java - 在 Java 中的数字类上使用 new 和构造函数有什么合理的理由吗?

java - 为什么 GWT 编译错误不会破坏 Maven 构建?

grails - 仅使用HTTP服务器创建Grails存储库?

java - 在 Eclipse 中安装适用于 Java 的 Windows Azure 访问控制服务过滤器插件的困难

php - 如何使用插件、add_filter 删除或更改 wordpress 中的 &lt;title&gt; 标签?

java - 创建一个函数来检查数组中的任何索引是否具有相同的值

java - Android TextView 编程

java - 如何在 GWT 中加入 Google Adsense

java - 预压缩、GWT 和 Tomcat