Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{scrollbar}

There

...

are

...

four

...

ways

...

of

...

creating

...

a

...

BI

...

Component:

...

create

...

a

...

BI

...

Component

...

from

...

scratch,

...

convert

...

an

...

existing

...

class

...

into

...

a

...

BI

...

Component,

...

create

...

a

...

subclass

...

of

...

ComponentBase

...

(org.pentaho.plugin.ComponentBase),

...

or

...

create

...

a

...

subclass

...

of

...

SimpleComponent

...

(org.pentaho.plugin.core.SimpleComponent).

...

To

...

become

...

a

...

BI

...

Component,

...

a

...

Java

...

object

...

must

...

implement

...

the

...

org.pentaho.core.component.IComponent

...

interface.

...

The

...

IComponent

...

interface

...

extends

...

two

...

other

...

interfaces:

...

org.pentaho.core.audit.IAuditable

...

and

...

org.pentaho.util.logging.ILogger.

...

Pentaho

...

provides

...

classes

...

that

...

implement

...

these

...

interfaces.

...

The

...

hierarchy

...

of

...

the

...

Pentaho

...

classes

...

looks

...

like

...

this:

...


org.pentaho.core.system.PentahoBase

...

(implements

...

ILogger

...

and

...

Serializable)

...


    -->

...

org.pentaho.core.system.PentahoMessenger

...


        -->

...

org.pentaho.plugin.ComponentBase

...

(implements

...

IComponent

...

and

...

IAuditable)
            -->

...

org.pentaho.plugin.core.SimpleComponent

...


                -->

...

other

...

Pentaho-provided

...

BI

...

Components

...

You

...

can

...

create

...

your

...

BI

...

Components

...

in

...

whatever

...

package

...

you

...

like

...

whether

...

they

...

are

...

subclasses

...

of

...

Pentaho

...

classes

...

or

...

not.

...

There

...

are

...

no

...

required

...

methods

...

that

...

will

...

be

...

inaccessible

...

if

...

you

...

use

...

a

...

non-Pentaho

...

package.

...

Extend

...

SimpleComponent

...

This

...

is

...

the

...

easiest

...

way

...

to

...

create

...

a

...

new

...

component

...

and

...

the

...

recommended

...

place

...

to

...

start.

...

  1. Create

...

  1. a

...

  1. new

...

  1. Java

...

  1. class

...

  1. that

...

  1. is

...

  1. a

...

  1. subclass

...

  1. of

...

  1. (extends)

...

  1. org.pentaho.plugin.core.SimpleComponent.

...

  1. Implement

...

  1. an

...

  1. executeAction

...

  1. method

...

  1. and

...

  1. a

...

  1. getLogger

...

  1. method.

...

  1. See

...

  1. #Component

...

  1. Methods

...

  1. below

...

  1. for

...

  1. a

...

  1. description

...

  1. of

...

  1. these

...

  1. methods.

...

Extend

...

ComponentBase

...

If

...

your

...

component

...

needs

...

to

...

validate

...

its

...

inputs

...

and/or

...

system

...

settings

...

or

...

needs

...

to

...

perform

...

any

...

initialization

...

and/or

...

cleanup,

...

you

...

should

...

extend

...

org.pentaho.plugin.ComponentBase.

...

  1. Create

...

  1. a

...

  1. new

...

  1. Java

...

  1. class

...

  1. that

...

  1. is

...

  1. a

...

  1. subclass

...

  1. of

...

  1. (extends)

...

  1. org.pentaho.plugin.ComponentBase.

...

  1. Add

...

  1. code

...

  1. to

...

  1. the

...

  1. init

...

  1. ,

...

  1. validateSystemSettings

...

  1. ,

...

  1. validateAction

...

  1. ,

...

  1. executeAction

...

  1. ,

...

  1. done

...

  1. ,

...

  1. and

...

  1. getLogger

...

  1. methods

...

  1. as

...

  1. appropriate.

...

Convert

...

a

...

Java

...

Object

...

into

...

a

...

BI

...

Component

...

If

...

you

...

have

...

an

...

existing

...

object

...

that

...

you

...

wish

...

to

...

convert

...

into

...

a

...

BI

...

Component

...

there

...

are

...

two

...

options.

...


Create

...

a

...

new

...

object

...

that

...

subclasses

...

your

...

existing

...

object

...

and

...

implements

...

the

...

required

...

interfaces

...


Change

...

your

...

object

...

to

...

implement

...

the

...

required

...

interfaces

...

Which

...

of

...

these

...

options

...

is

...

the

...

best

...

for

...

your

...

particular

...

object

...

will

...

depend

...

on

...

your

...

specific

...

circumstances;

...

but,

...

we

...

recommend

...

creating

...

a

...

subclass

...

if

...

only

...

to

...

keep

...

your

...

source

...

file

...

size

...

manageable.

...

If

...

you

...

do

...

need

...

to

...

use

...

this

...

approach

...

most

...

of

...

the

...

code

...

you

...

need

...

to

...

create

...

your

...

new

...

class

...

can

...

be

...

found

...

in

...

these

...

classes:

...

org.pentaho.core.system.PentahoBase,

...

org.pentaho.core.system.PentahoMessenger,

...

and

...

org.pentaho.plugin.ComponentBase.

...

To

...

make

...

this

...

process

...

easier

...

we

...

have

...

created

...

a

...

class,

...

org.pentaho.plugin.ComponentSubclassExample,

...

that

...

contains

...

the

...

code

...

you

...

need.

...

To

...

convert

...

a

...

Java

...

class

...

to

...

a

...

BI

...

Component:

...

  1. Copy

...

  1. the

...

  1. imports,

...

  1. member

...

  1. variables,

...

  1. and

...

  1. methods

...

  1. from

...

  1. org.pentaho.plugin.ComponentSubclassExample

...

  1. into

...

  1. your

...

  1. Java

...

  1. class.

...

  1. Add

...

  1. code

...

  1. to

...

  1. the

...

  1. init

...

  1. ,

...

  1. validateSystemSettings

...

  1. ,

...

  1. validateAction

...

  1. ,

...

  1. executeAction

...

  1. ,

...

  1. done

...

  1. ,

...

  1. and

...

  1. getLogger

...

  1. methods

...

  1. as

...

  1. appropriate.

...

Components

...

from

...

Scratch

...

In

...

order

...

to

...

create

...

a

...

component

...

from

...

scratch

...

a

...

new

...

class

...

that

...

implements

...

the

...

interface

...

org.pentaho.core.component.IComponent

...

must

...

be

...

created.

...

To

...

implement

...

all

...

three

...

interfaces

...

requires

...

about

...

30

...

methods

...

to

...

be

...

implemented.

...

It

...

is

...

not

...

recommended

...

to

...

use

...

this

...

option

...

and

...

there

...

should

...

be

...

no

...

need

...

to

...

do

...

this

...

given

...

the

...

options

...

above.

...

Anchor
Component Methods
Component Methods

Component Methods

If using one of the three recommended methods for creating new components, the methods below are the BI Component methods that need to be customized to provide your needed functionality. The methods are listed in the order that they are typically called during normal processing. Depending on the option used to create your component, not all of these methods are required. See above sections for more details.

Child pages (Children Display)