Java Pentaho 5 BI服务器gwt插件

Java Pentaho 5 BI服务器gwt插件,java,gwt,plugins,pentaho,Java,Gwt,Plugins,Pentaho,我正在更新一个在BI3.x-4.x中正常运行的gwt插件。我在代码中做了一些修改,现在插件能够在存储库中保存/加载其数据,并在浏览器中键入url时加载其状态 http://localhost:8080/pentaho/content/stdashboard?path=/home/admin&action=test2.std&mode=view#dashboard 首先,我注意到来自may content type的操作中的操作没有任何作用,我使用了稍后在plugin.xml和p

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

http://localhost:8080/pentaho/content/stdashboard?path=/home/admin&action=test2.std&mode=view#dashboard
首先,我注意到来自may content type的操作中的操作没有任何作用,我使用了稍后在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时,应用程序exec首先是ContentGenerator,然后是WS,然后是ConntextGenerator

plugin.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>

STDashboard插件
STDashboard配置文件
content/stdashboard res/stdashboard_16.jpg
com.stratebi.stdashboard.STDashboardContentTypeMetaProvider
跑
跑
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端点公开功能

这样,您只需要在plugin.spring.xml中声明端点,然后使用

/pentaho/plugin/<your plugin>/<whatever urls you decide to create>
/pentaho/plugin//
我们在webdetails这里使用的经验法则是,如果您要生成基于文件的内容以显示给用户,请使用内容生成器和
api/repos/…../../.


如果您公开的服务将被您的插件使用,请使用带有Jersey资源的REST端点。

我理解您的答案,但我没有时间重做,我是GWT的新手。我使用了一种变通方法。我修改了内容生成器并检查了请求的URL,如果它包含要加载的资源,我会得到它并进行响应nse.sendRedirect指向插件的URL。这不是标准的,但目前还有效。