org.pentaho.platform.api.engine
Interface IComponent

All Superinterfaces:
IAuditable, ILogger
All Known Subinterfaces:
IDataComponent, IPreparedComponent
All Known Implementing Classes:
AbstractGenerateContentComponent, AbstractGenerateStreamContentComponent, AbstractJFreeReportComponent, BIRTReportComponent, ChartComponent, ComponentBase, ComponentImplementationExample, ContentOutputComponent, ContentRepositoryCleaner, Custom1, EmailComponent, HelloWorldComponent, HQLBaseComponent, HQLDataComponent, HQLLookupRule, InstanceEnd, JasperReportsComponent, JavascriptRule, JFreeReportAllContentComponent, JFreeReportComponent, JFreeReportConfigParameterComponent, JFreeReportCSVComponent, JFreeReportDataComponent, JFreeReportDirectoryHtmlComponent, JFreeReportExcelComponent, JFreeReportGenerateDefinitionComponent, JFreeReportGeneratorComponent, JFreeReportHtmlComponent, JFreeReportLoadComponent, JFreeReportParametersComponent, JFreeReportPdfComponent, JFreeReportPreviewSwingComponent, JFreeReportPrintComponent, JFreeReportRTFComponent, JFreeReportStreamHtmlComponent, JFreeReportValidateParametersComponent, JFreeReportXmlComponent, JFreeReportZipHtmlComponent, JobSchedulerComponent, KettleComponent, MDXBaseComponent, MDXDataComponent, MDXLookupRule, MockComponent, MondrianModelComponent, MQLRelationalDataComponent, OpenFlashChartComponent, PentahoVersionCheckComponent, PivotViewComponent, PojoComponent, PojoComponent, PrintComponent, ReportWizardSpecComponent, ResultSetCompareComponent, ResultSetCrosstabComponent, ResultSetExportComponent, ResultSetFlattenerComponent, SchedulerAdminComponent, SecureFilterComponent, SQLBaseComponent, SQLDataComponent, SQLDdlComponent, SQLExecute, SQLLookupRule, SubActionComponent, TemplateComponent, TestComponent, UtilityComponent, WebServiceLookupRule, XMLABaseComponent, XMLADataComponent, XMLALookupRule, XQueryBaseComponent, XQueryLookupRule

public interface IComponent
extends IAuditable, ILogger

A Component is the smallest module in the platform architecture and represents a unit of work, or an action to be performed. Different Component implementations provide new channels of functionality as well as multiple implementations of similar features (.ie, the BIRT Reporting Component and the Jasper Reports Reporting Component).


Field Summary
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Method Summary
 void done()
          Allows the component to perform any cleanup after the execution of the action.
 int execute()
          Perform the Component execution; logic for what this Component does goes here.
 org.pentaho.actionsequence.dom.IActionDefinition getActionDefinition()
           
 String getActionName()
          Return the name of the action sequence.
 org.dom4j.Node getComponentDefinition()
           
 String getInstanceId()
           
 List getMessages()
           
 String getProcessId()
          Return the id for the execution of a given action sequence document.
 IRuntimeContext getRuntimeContext()
           
 IPentahoSession getSession()
           
 boolean init()
          Initialize the Component.
 void setActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition)
           
 void setActionName(String actionName)
           
 void setComponentDefinition(org.dom4j.Node componentDefinition)
           
 void setComponentDefinitionMap(Map<String,String> componentDefinitionMap)
           
 void setInstanceId(String instanceId)
           
 void setMessages(List messaes)
           
 void setProcessId(String processId)
           
 void setRuntimeContext(IRuntimeContext runtimeContext)
           
 void setSession(IPentahoSession session)
           
 int validate()
          Validate that the Component has all the necessary inputs, outputs and resources it needs to execute successfully.
 
Methods inherited from interface org.pentaho.platform.api.engine.IAuditable
getId, getObjectName
 
Methods inherited from interface org.pentaho.platform.api.engine.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 

Method Detail

init

boolean init()
Initialize the Component. This method is typically called on construction.

Returns:
returns true if the Component initialized successfully, otherwise returns false

validate

int validate()
Validate that the Component has all the necessary inputs, outputs and resources it needs to execute successfully. Also may validate a schema here.

Returns:
one of IRuntimeContext validation conditions
See Also:
IRuntimeContext

execute

int execute()
Perform the Component execution; logic for what this Component does goes here.

Returns:
one of IRuntimeContext execution conditions
See Also:
IRuntimeContext

done

void done()
Allows the component to perform any cleanup after the execution of the action.


setInstanceId

void setInstanceId(String instanceId)

getInstanceId

String getInstanceId()

setActionName

void setActionName(String actionName)

getActionName

String getActionName()
Description copied from interface: IAuditable
Return the name of the action sequence. Today, that name is synonymous with the name of the action sequence document in the solution repository.

Specified by:
getActionName in interface IAuditable
Returns:
the name of the action sequence

setProcessId

void setProcessId(String processId)

getProcessId

String getProcessId()
Description copied from interface: IAuditable
Return the id for the execution of a given action sequence document.

Specified by:
getProcessId in interface IAuditable
Returns:
the process id

setComponentDefinition

void setComponentDefinition(org.dom4j.Node componentDefinition)

setComponentDefinitionMap

void setComponentDefinitionMap(Map<String,String> componentDefinitionMap)

getComponentDefinition

org.dom4j.Node getComponentDefinition()

setRuntimeContext

void setRuntimeContext(IRuntimeContext runtimeContext)

getRuntimeContext

IRuntimeContext getRuntimeContext()

setSession

void setSession(IPentahoSession session)

getSession

IPentahoSession getSession()

setMessages

void setMessages(List messaes)

getMessages

List getMessages()

setActionDefinition

void setActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition)

getActionDefinition

org.pentaho.actionsequence.dom.IActionDefinition getActionDefinition()