Package org.pentaho.platform.api.engine
Interface IComponent
-
- All Superinterfaces:
IAuditable,ILogger
- All Known Subinterfaces:
IDataComponent,IPreparedComponent
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddone()Allows the component to perform any cleanup after the execution of the action.intexecute()Perform the Component execution; logic for what this Component does goes here.org.pentaho.actionsequence.dom.IActionDefinitiongetActionDefinition()StringgetActionName()Return the name of the action sequence.org.dom4j.NodegetComponentDefinition()StringgetInstanceId()ListgetMessages()StringgetProcessId()Return the id for the execution of a given action sequence document.IRuntimeContextgetRuntimeContext()IPentahoSessiongetSession()booleaninit()Initialize the Component.voidsetActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition)voidsetActionName(String actionName)voidsetComponentDefinition(org.dom4j.Node componentDefinition)voidsetComponentDefinitionMap(Map<String,String> componentDefinitionMap)voidsetInstanceId(String instanceId)voidsetMessages(List messaes)voidsetProcessId(String processId)voidsetRuntimeContext(IRuntimeContext runtimeContext)voidsetSession(IPentahoSession session)intvalidate()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
-
-
-
-
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:IAuditableReturn 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:
getActionNamein interfaceIAuditable- Returns:
- the name of the action sequence
-
setProcessId
void setProcessId(String processId)
-
getProcessId
String getProcessId()
Description copied from interface:IAuditableReturn the id for the execution of a given action sequence document.- Specified by:
getProcessIdin interfaceIAuditable- 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()
-
-