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 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
-
-
-
-
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 interfaceIAuditable
- 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 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()
-
-