Class ComponentImplementationExample
java.lang.Object
org.pentaho.platform.plugin.action.examples.ComponentImplementationExample
- All Implemented Interfaces:
org.pentaho.platform.api.engine.IAuditable
,org.pentaho.platform.api.engine.IComponent
,org.pentaho.platform.api.engine.ILogger
public class ComponentImplementationExample
extends Object
implements org.pentaho.platform.api.engine.IComponent
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final boolean
protected int
static final String
static final String
static final String
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
applyInputsToFormat
(String format) protected void
void
createFeedbackParameter
(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle) protected void
createFeedbackParameter
(String fieldName, String displayName, String hint, String defaultValue, boolean visible) protected void
createFeedbackParameter
(org.pentaho.platform.api.engine.IActionParameter actionParam) protected void
createFeedbackParameter
(org.pentaho.platform.api.engine.ISelectionMapper selMap, String fieldName, Object defaultValues) createNewInstance
(boolean persisted, Map parameters, boolean forceImmediateWrite) void
void
void
done()
void
void
int
execute()
protected boolean
void
void
protected boolean
void
genLogIdFromInfo
(String sessId, String procId, String actName) void
genLogIdFromInfo
(String sessId, String procId, String actName, String instId) void
genLogIdFromSession
(org.pentaho.platform.api.engine.IPentahoSession sess) org.pentaho.actionsequence.dom.IActionDefinition
org.dom4j.Node
protected OutputStream
getDefaultOutputStream
(String mimeType) protected OutputStream
getId()
boolean
protected boolean
getInputBooleanValue
(String inputName, boolean defaultValue) protected long
getInputLongValue
(String inputName, long defaultValue) protected Set
protected org.pentaho.platform.api.engine.IActionParameter
getInputParameter
(String parameterName) protected InputStream
getInputStream
(String inputName) protected String
getInputStringValue
(String inputName) protected Object
getInputValue
(String inputName) org.apache.commons.logging.Log
int
getLogId()
protected org.pentaho.platform.api.repository.IContentItem
getOutputContentItem
(String mimeType) protected org.pentaho.platform.api.repository.IContentItem
getOutputContentItem
(String outputName, String mimeType) protected org.pentaho.platform.api.engine.IActionParameter
getOutputItem
(String outputName) protected org.pentaho.platform.api.repository.IContentItem
getOutputItem
(String outputName, String mimeType, String extension) protected Set
protected int
protected org.pentaho.platform.api.engine.IActionSequenceResource
getResource
(String resourceName) getResourceAsString
(org.pentaho.platform.api.engine.IActionSequenceResource resource) protected org.pentaho.commons.connection.IPentahoStreamSource
getResourceDataSource
(org.pentaho.platform.api.engine.IActionSequenceResource resource) protected InputStream
getResourceInputStream
(org.pentaho.platform.api.engine.IActionSequenceResource resource) protected Set
org.pentaho.platform.api.engine.IRuntimeContext
org.pentaho.platform.api.engine.IPentahoSession
protected Object
getSetting
(String name) protected String
protected String
protected String
getStringSetting
(String name) static String
getUserString
(String type) void
void
boolean
init()
void
inputMissingError
(String paramName) protected boolean
isDefinedInput
(String inputName) protected boolean
isDefinedOutput
(String outputName) protected boolean
isDefinedResource
(String resourceName) protected boolean
void
outputMissingError
(String paramName) void
void
void
resourceComponentSettingError
(String paramName) void
resourceMissingError
(String paramName) protected void
saveSetting
(String name, Object value) void
setActionDefinition
(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition) void
setActionName
(String actionName) void
setComponentDefinition
(org.dom4j.Node componentDefinition) void
setComponentDefinitionMap
(Map<String, String> componentDefinitionMap) protected void
setFeedbackMimeType
(String mimeType) void
setInstanceId
(String instanceId) void
setLoggingLevel
(int logLevel) void
void
setMessages
(List messages) protected void
setOutputMimeType
(String mimeType) protected void
setOutputValue
(String outputName, Object value) void
setProcessId
(String processId) void
setRuntimeContext
(org.pentaho.platform.api.engine.IRuntimeContext runtimeContext) void
setSession
(org.pentaho.platform.api.engine.IPentahoSession session) void
void
final int
validate()
boolean
protected boolean
void
void
-
Field Details
-
loggingLevel
protected int loggingLevel -
LOGID_MASK1
- See Also:
-
LOGID_MASK2
- See Also:
-
LOGID_SEPARATOR
- See Also:
-
EMPTYLOGID
-
debug
protected static final boolean debug- See Also:
-
-
Constructor Details
-
ComponentImplementationExample
public ComponentImplementationExample()
-
-
Method Details
-
executeAction
- Throws:
Throwable
-
validateAction
public boolean validateAction() -
validateSystemSettings
protected boolean validateSystemSettings() -
done
public void done()- Specified by:
done
in interfaceorg.pentaho.platform.api.engine.IComponent
-
init
public boolean init()- Specified by:
init
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setLogId
-
getLogger
public org.apache.commons.logging.Log getLogger() -
genLogIdFromSession
public void genLogIdFromSession(org.pentaho.platform.api.engine.IPentahoSession sess) -
genLogIdFromInfo
-
genLogIdFromInfo
-
getObjectName
- Specified by:
getObjectName
in interfaceorg.pentaho.platform.api.engine.IAuditable
-
getLoggingLevel
public int getLoggingLevel()- Specified by:
getLoggingLevel
in interfaceorg.pentaho.platform.api.engine.ILogger
-
setLoggingLevel
public void setLoggingLevel(int logLevel) - Specified by:
setLoggingLevel
in interfaceorg.pentaho.platform.api.engine.ILogger
-
getMessages
- Specified by:
getMessages
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setMessages
- Specified by:
setMessages
in interfaceorg.pentaho.platform.api.engine.IComponent
-
trace
- Specified by:
trace
in interfaceorg.pentaho.platform.api.engine.ILogger
-
debug
- Specified by:
debug
in interfaceorg.pentaho.platform.api.engine.ILogger
-
info
- Specified by:
info
in interfaceorg.pentaho.platform.api.engine.ILogger
-
warn
- Specified by:
warn
in interfaceorg.pentaho.platform.api.engine.ILogger
-
error
- Specified by:
error
in interfaceorg.pentaho.platform.api.engine.ILogger
-
fatal
- Specified by:
fatal
in interfaceorg.pentaho.platform.api.engine.ILogger
-
trace
- Specified by:
trace
in interfaceorg.pentaho.platform.api.engine.ILogger
-
debug
- Specified by:
debug
in interfaceorg.pentaho.platform.api.engine.ILogger
-
info
- Specified by:
info
in interfaceorg.pentaho.platform.api.engine.ILogger
-
warn
- Specified by:
warn
in interfaceorg.pentaho.platform.api.engine.ILogger
-
error
- Specified by:
error
in interfaceorg.pentaho.platform.api.engine.ILogger
-
fatal
- Specified by:
fatal
in interfaceorg.pentaho.platform.api.engine.ILogger
-
getUserString
-
setInstanceId
- Specified by:
setInstanceId
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getInstanceId
- Specified by:
getInstanceId
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setActionName
- Specified by:
setActionName
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getActionName
- Specified by:
getActionName
in interfaceorg.pentaho.platform.api.engine.IAuditable
- Specified by:
getActionName
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setProcessId
- Specified by:
setProcessId
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getProcessId
- Specified by:
getProcessId
in interfaceorg.pentaho.platform.api.engine.IAuditable
- Specified by:
getProcessId
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setComponentDefinitionMap
- Specified by:
setComponentDefinitionMap
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setComponentDefinition
public void setComponentDefinition(org.dom4j.Node componentDefinition) - Specified by:
setComponentDefinition
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getComponentDefinition
public org.dom4j.Node getComponentDefinition()- Specified by:
getComponentDefinition
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setRuntimeContext
public void setRuntimeContext(org.pentaho.platform.api.engine.IRuntimeContext runtimeContext) - Specified by:
setRuntimeContext
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getRuntimeContext
public org.pentaho.platform.api.engine.IRuntimeContext getRuntimeContext()- Specified by:
getRuntimeContext
in interfaceorg.pentaho.platform.api.engine.IComponent
-
setSession
public void setSession(org.pentaho.platform.api.engine.IPentahoSession session) - Specified by:
setSession
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getSession
public org.pentaho.platform.api.engine.IPentahoSession getSession()- Specified by:
getSession
in interfaceorg.pentaho.platform.api.engine.IComponent
-
saveSetting
-
getSetting
-
getStringSetting
-
getLogId
-
isDefinedInput
-
isDefinedOutput
-
isDefinedResource
-
validate
public final int validate()- Specified by:
validate
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getInitOk
public boolean getInitOk() -
getOutputNames
-
getInputNames
-
getResourceNames
-
feedbackAllowed
protected boolean feedbackAllowed() -
getResource
-
getResourceInputStream
protected InputStream getResourceInputStream(org.pentaho.platform.api.engine.IActionSequenceResource resource) throws FileNotFoundException - Throws:
FileNotFoundException
-
getInputStream
-
getOutputPreference
protected int getOutputPreference() -
getOutputItem
-
audit
-
getInputBooleanValue
-
getInputLongValue
-
getInputStringValue
-
getInputValue
-
promptNeeded
public void promptNeeded() -
promptNow
public void promptNow() -
getResourceAsString
-
getInitFailMessage
-
createNewInstance
-
inputMissingError
-
outputMissingError
-
resourceMissingError
-
resourceComponentSettingError
-
execute
public int execute()- Specified by:
execute
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getId
- Specified by:
getId
in interfaceorg.pentaho.platform.api.engine.IAuditable
-
getActionTitle
-
getOutputContentItem
-
getOutputContentItem
-
setOutputValue
-
getDefaultOutputStream
-
applyInputsToFormat
-
getOutputItem
-
getSolutionName
-
getSolutionPath
-
getInputParameter
-
isPromptPending
protected boolean isPromptPending() -
setFeedbackMimeType
-
setOutputMimeType
-
getFeedbackOutputStream
-
createFeedbackParameter
protected void createFeedbackParameter(org.pentaho.platform.api.engine.IActionParameter actionParam) -
createFeedbackParameter
-
createFeedbackParameter
-
createFeedbackParameter
-
getResourceDataSource
protected org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(org.pentaho.platform.api.engine.IActionSequenceResource resource) throws FileNotFoundException - Throws:
FileNotFoundException
-
setActionDefinition
public void setActionDefinition(org.pentaho.actionsequence.dom.IActionDefinition actionDefinition) - Specified by:
setActionDefinition
in interfaceorg.pentaho.platform.api.engine.IComponent
-
getActionDefinition
public org.pentaho.actionsequence.dom.IActionDefinition getActionDefinition()- Specified by:
getActionDefinition
in interfaceorg.pentaho.platform.api.engine.IComponent
-