Pentaho Source Code Analysis

Source: Internet
Author: User

The Pentaho project is divided into three main parts:

Üpentaho engine (This section after basic rarely changes)

Üpentaho-solution (solution, which is the part that is built on the basis of different needs)

Üpentaho-style (This is a standalone application, full-time responsible for displaying the style)

Pentaho Home Research Note (home.jsp)

The template of the homepage is ${solution-path}/system/custom/template-home.html

The benefit of taking a template page separates the displayed style from the displayed content and is specifically responsible for the display style in Pentaho

1. First initialize the pentahosession, pentahosession a package for the httpsession.

2. Getuitemplater (ipentahosession session), based on Pentahosystem's Tool method, obtains the template core interface Iuitemplater (Iuitemplater is often used, Configured in the Pentaho.xml file, cached throughout the global domain)

3. Template Core Class Uiutil (Iuitemplater implementation) with Breaktemplate ("template-home.html", "", usersession) method, get ${ solution-path}/system/custom/template-home.html file and convert the file to a string. And divide the template into two lines, intro and Footer , in {content}

 

 

 

 


Pentaho research on key interfaces and their classes

1. ipentahosession

Encapsulating HttpSession and Portletsession, in addition to the usual methods of providing these sessions, provides the following methods:

U GetLocale () gets the locale object of session

U isauthenticated () determine if the current session is certified

U setauthenticated (String name) sets the name of the session and indicates that the session is authenticated if HTTP or portlet session,name should be the login username ( Request.getremoteuser ())

U setnotauthenticated () set login session for unauthorized

U Setbackgroundexecutionalert ()

U Getbackgroundexexutionalert () verifies the status of the background execution task and returns True if the background execution triggers a warning (alert)

U Resetbackgroundexecutuionalert ()

2. isolutionengine

A request has a solution engine that handles one or more action sequences

U setparameterprovider (String name,iparameterprovider parameterprovider) Sets the source of the input parameters

U public Iruntimecontext execute () let Iruntimecontext execute action sequence (with three Execute methods)

U public void Setlistener (Iactioncompletelistener Listener) sets the listener for action completion, which is monitored by the listener when the action is completed

U public void Setsession (ipentahosession session) Set solution engine session

U public iruntimecontext Getexecutioncontext () returns the running environment of execution

u int Status () returns the current state of execution

U public void Init (ipentahosession session) initializes the Solutionengine after the object is constructed (or solution engines reused in a different way Time) to execute the method immediately

U public void setforceprompt (boolean forceprompt) settings enforce Promp page

U public void setparameterxsl (String XSL) is set for the current component

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.