|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.engine.core.system.PentahoBase org.pentaho.platform.engine.services.PentahoMessenger org.pentaho.platform.engine.services.solution.ComponentBase
public abstract class ComponentBase
Field Summary | |
---|---|
static String |
COMPONENT_EXECUTE_FAIL
|
static String |
MISSING_SESSION
|
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
---|
EMPTYLOGID, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR |
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 |
Constructor Summary | |
---|---|
ComponentBase()
|
Method Summary | |
---|---|
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValues,
List values,
Map dispNames,
String displayStyle)
|
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValues,
List values,
Map dispNames,
String displayStyle,
boolean optional)
|
String |
createNewInstance(boolean persisted,
Map parameters,
boolean forceImmediateWrite)
|
abstract 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. |
String |
getActionTitle()
|
org.dom4j.Node |
getComponentDefinition()
|
org.dom4j.Node |
getComponentDefinition(boolean process)
Return the xml Node containing the component's definition. |
String |
getId()
Returns a unique id (across classes and instances) for this auditable object. |
String |
getInitFailMessage()
|
boolean |
getInitOk()
|
String |
getInstanceId()
|
String |
getLogId()
|
String |
getObjectName()
Returns the Java class name for this object. |
String |
getProcessId()
Return the id for the execution of a given action sequence document. |
String |
getResourceAsString(IActionSequenceResource resource)
|
IRuntimeContext |
getRuntimeContext()
|
IPentahoSession |
getSession()
|
abstract boolean |
init()
Initialize the Component. |
void |
inputMissingError(String paramName)
|
void |
outputMissingError(String paramName)
|
void |
promptNeeded()
|
void |
promptNow()
|
int |
resolveParameter(String template,
String parameterName,
Matcher parameterMatcher,
int copyStart,
StringBuffer result)
Provides a way for components to inject their own replacements of parameter markers in the provided template. |
void |
resourceComponentSettingError(String paramName)
|
void |
resourceMissingError(String paramName)
|
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 |
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 class org.pentaho.platform.engine.services.PentahoMessenger |
---|
debug, debug, error, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn |
Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
---|
genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLogger, getLoggingLevel, setLoggingLevel, setLogId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pentaho.platform.api.engine.IComponent |
---|
getMessages, setMessages |
Methods inherited from interface org.pentaho.platform.api.engine.ILogger |
---|
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn |
Field Detail |
---|
public static final String MISSING_SESSION
public static final String COMPONENT_EXECUTE_FAIL
Constructor Detail |
---|
public ComponentBase()
Method Detail |
---|
public void setInstanceId(String instanceId)
setInstanceId
in interface IComponent
public String getInstanceId()
getInstanceId
in interface IComponent
public void setActionName(String actionName)
setActionName
in interface IComponent
public String getActionName()
IAuditable
getActionName
in interface IAuditable
getActionName
in interface IComponent
public void setProcessId(String processId)
setProcessId
in interface IComponent
public String getProcessId()
IAuditable
getProcessId
in interface IAuditable
getProcessId
in interface IComponent
public void setComponentDefinition(org.dom4j.Node componentDefinition)
setComponentDefinition
in interface IComponent
public void setComponentDefinitionMap(Map<String,String> componentDefinitionMap)
setComponentDefinitionMap
in interface IComponent
public org.dom4j.Node getComponentDefinition()
getComponentDefinition
in interface IComponent
public org.dom4j.Node getComponentDefinition(boolean process)
process
is true, visit every child node in the tree, and
if the child node's text is an action parameter convert it to it's
value. (See doc for applyInputsToFormat())
process
- if true, if the node's text represents a parameter, convert
the parameter to it's value, and assign the value to the
node's text.
public void setRuntimeContext(IRuntimeContext runtimeContext)
setRuntimeContext
in interface IComponent
public IRuntimeContext getRuntimeContext()
getRuntimeContext
in interface IComponent
public void setSession(IPentahoSession session)
setSession
in interface IComponent
public IPentahoSession getSession()
getSession
in interface IComponent
public abstract void done()
IComponent
done
in interface IComponent
public abstract boolean init()
IComponent
init
in interface IComponent
public String getLogId()
getLogId
in class PentahoBase
public final int validate()
IComponent
validate
in interface IComponent
IRuntimeContext
public int resolveParameter(String template, String parameterName, Matcher parameterMatcher, int copyStart, StringBuffer result)
IParameterResolver
resolveParameter
in interface IParameterResolver
template
- The string containing replacement parametersparameterName
- The name of the located parameter in the templateparameterMatcher
- The Regex matcher that located the parametercopyStart
- The current start to copy from the templateresult
- The final string with the parameter replacements inlined
public boolean getInitOk()
public void promptNeeded()
public void promptNow()
public String getResourceAsString(IActionSequenceResource resource)
public String getInitFailMessage()
public String createNewInstance(boolean persisted, Map parameters, boolean forceImmediateWrite)
public void inputMissingError(String paramName)
public void outputMissingError(String paramName)
public void resourceMissingError(String paramName)
public void resourceComponentSettingError(String paramName)
public int execute()
IComponent
execute
in interface IComponent
IRuntimeContext
public String getObjectName()
IAuditable
getObjectName
in interface IAuditable
getObjectName
in class PentahoBase
public String getId()
IAuditable
getId
in interface IAuditable
public String getActionTitle()
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle)
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle, boolean optional)
public void setActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition)
setActionDefinition
in interface IComponent
public org.pentaho.actionsequence.dom.IActionDefinition getActionDefinition()
getActionDefinition
in interface IComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |