java - Pentaho 5 BI Server gwt plugin -
i'm updating gwt plugin function in bi 3.x-4.x. made corrections in code , plugin able save/load data in repository , load status when type url in browser
http://localhost:8080/pentaho/content/stdashboard?path=/home/admin&action=test2.std&mode=view#dashboard
first note action in operations may content-type don't , used perspective referenced later in plugin.xml , plugin.spring.xml.
when run application generated url
http://localhost:8080/pentaho/api/repos/:home:admin:test2.std/run?ts=1395256028350
and in contentgenerator (class receive path value "/home/admin/test2.std" ok according version thing i'm missing or doing wrong because gwt-ws not called, contexgenerator.
when type url in browser application exec first contentgenerator, ws , again 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&path=temp&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&path=temp&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>
thanks in advance
not sure if helps, i'd exposing functionality via rest endpoints using jersey.
that way need declare endpoint in plugin.spring.xml , call them using
/pentaho/plugin/<your plugin>/<whatever urls decide create>
the rule of thumb use here @ webdetails if you're generating file-based content show user, use content generator , api/repos/...../<run or edit or generatedcontent>.
if you're exposing service consumed plugin, use rest endpoint jersey resource.
Comments
Post a Comment