Class 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
    • Constructor Detail

      • ComponentImplementationExample

        public ComponentImplementationExample()
    • Method Detail

      • validateAction

        public boolean validateAction()
      • validateSystemSettings

        protected boolean validateSystemSettings()
      • done

        public void done()
        Specified by:
        done in interface org.pentaho.platform.api.engine.IComponent
      • init

        public boolean init()
        Specified by:
        init in interface org.pentaho.platform.api.engine.IComponent
      • setLogId

        public void setLogId​(String lId)
      • getLogger

        public org.apache.commons.logging.Log getLogger()
      • genLogIdFromSession

        public void genLogIdFromSession​(org.pentaho.platform.api.engine.IPentahoSession sess)
      • genLogIdFromInfo

        public void genLogIdFromInfo​(String sessId,
                                     String procId,
                                     String actName)
      • getObjectName

        public String getObjectName()
        Specified by:
        getObjectName in interface org.pentaho.platform.api.engine.IAuditable
      • getLoggingLevel

        public int getLoggingLevel()
        Specified by:
        getLoggingLevel in interface org.pentaho.platform.api.engine.ILogger
      • setLoggingLevel

        public void setLoggingLevel​(int logLevel)
        Specified by:
        setLoggingLevel in interface org.pentaho.platform.api.engine.ILogger
      • getMessages

        public List getMessages()
        Specified by:
        getMessages in interface org.pentaho.platform.api.engine.IComponent
      • setMessages

        public void setMessages​(List messages)
        Specified by:
        setMessages in interface org.pentaho.platform.api.engine.IComponent
      • trace

        public void trace​(String message)
        Specified by:
        trace in interface org.pentaho.platform.api.engine.ILogger
      • debug

        public void debug​(String message)
        Specified by:
        debug in interface org.pentaho.platform.api.engine.ILogger
      • info

        public void info​(String message)
        Specified by:
        info in interface org.pentaho.platform.api.engine.ILogger
      • warn

        public void warn​(String message)
        Specified by:
        warn in interface org.pentaho.platform.api.engine.ILogger
      • error

        public void error​(String message)
        Specified by:
        error in interface org.pentaho.platform.api.engine.ILogger
      • fatal

        public void fatal​(String message)
        Specified by:
        fatal in interface org.pentaho.platform.api.engine.ILogger
      • trace

        public void trace​(String message,
                          Throwable error)
        Specified by:
        trace in interface org.pentaho.platform.api.engine.ILogger
      • debug

        public void debug​(String message,
                          Throwable error)
        Specified by:
        debug in interface org.pentaho.platform.api.engine.ILogger
      • info

        public void info​(String message,
                         Throwable error)
        Specified by:
        info in interface org.pentaho.platform.api.engine.ILogger
      • warn

        public void warn​(String message,
                         Throwable error)
        Specified by:
        warn in interface org.pentaho.platform.api.engine.ILogger
      • error

        public void error​(String message,
                          Throwable error)
        Specified by:
        error in interface org.pentaho.platform.api.engine.ILogger
      • fatal

        public void fatal​(String message,
                          Throwable error)
        Specified by:
        fatal in interface org.pentaho.platform.api.engine.ILogger
      • getUserString

        public static String getUserString​(String type)
      • setInstanceId

        public void setInstanceId​(String instanceId)
        Specified by:
        setInstanceId in interface org.pentaho.platform.api.engine.IComponent
      • getInstanceId

        public String getInstanceId()
        Specified by:
        getInstanceId in interface org.pentaho.platform.api.engine.IComponent
      • setActionName

        public void setActionName​(String actionName)
        Specified by:
        setActionName in interface org.pentaho.platform.api.engine.IComponent
      • getActionName

        public String getActionName()
        Specified by:
        getActionName in interface org.pentaho.platform.api.engine.IAuditable
        Specified by:
        getActionName in interface org.pentaho.platform.api.engine.IComponent
      • setProcessId

        public void setProcessId​(String processId)
        Specified by:
        setProcessId in interface org.pentaho.platform.api.engine.IComponent
      • getProcessId

        public String getProcessId()
        Specified by:
        getProcessId in interface org.pentaho.platform.api.engine.IAuditable
        Specified by:
        getProcessId in interface org.pentaho.platform.api.engine.IComponent
      • setComponentDefinitionMap

        public void setComponentDefinitionMap​(Map<String,​String> componentDefinitionMap)
        Specified by:
        setComponentDefinitionMap in interface org.pentaho.platform.api.engine.IComponent
      • setComponentDefinition

        public void setComponentDefinition​(org.dom4j.Node componentDefinition)
        Specified by:
        setComponentDefinition in interface org.pentaho.platform.api.engine.IComponent
      • getComponentDefinition

        public org.dom4j.Node getComponentDefinition()
        Specified by:
        getComponentDefinition in interface org.pentaho.platform.api.engine.IComponent
      • setRuntimeContext

        public void setRuntimeContext​(org.pentaho.platform.api.engine.IRuntimeContext runtimeContext)
        Specified by:
        setRuntimeContext in interface org.pentaho.platform.api.engine.IComponent
      • getRuntimeContext

        public org.pentaho.platform.api.engine.IRuntimeContext getRuntimeContext()
        Specified by:
        getRuntimeContext in interface org.pentaho.platform.api.engine.IComponent
      • setSession

        public void setSession​(org.pentaho.platform.api.engine.IPentahoSession session)
        Specified by:
        setSession in interface org.pentaho.platform.api.engine.IComponent
      • getSession

        public org.pentaho.platform.api.engine.IPentahoSession getSession()
        Specified by:
        getSession in interface org.pentaho.platform.api.engine.IComponent
      • saveSetting

        protected void saveSetting​(String name,
                                   Object value)
      • getStringSetting

        protected String getStringSetting​(String name)
      • getLogId

        public String getLogId()
      • isDefinedInput

        protected boolean isDefinedInput​(String inputName)
      • isDefinedOutput

        protected boolean isDefinedOutput​(String outputName)
      • isDefinedResource

        protected boolean isDefinedResource​(String resourceName)
      • validate

        public final int validate()
        Specified by:
        validate in interface org.pentaho.platform.api.engine.IComponent
      • getInitOk

        public boolean getInitOk()
      • getOutputNames

        protected Set getOutputNames()
      • getInputNames

        protected Set getInputNames()
      • getResourceNames

        protected Set getResourceNames()
      • feedbackAllowed

        protected boolean feedbackAllowed()
      • getResource

        protected org.pentaho.platform.api.engine.IActionSequenceResource getResource​(String resourceName)
      • getOutputPreference

        protected int getOutputPreference()
      • getOutputItem

        protected org.pentaho.platform.api.repository.IContentItem getOutputItem​(String outputName,
                                                                                 String mimeType,
                                                                                 String extension)
      • audit

        protected void audit​(String messageType,
                             String message,
                             String value,
                             int duration)
      • getInputBooleanValue

        protected boolean getInputBooleanValue​(String inputName,
                                               boolean defaultValue)
      • getInputLongValue

        protected long getInputLongValue​(String inputName,
                                         long defaultValue)
      • getInputStringValue

        protected String getInputStringValue​(String inputName)
      • getInputValue

        protected Object getInputValue​(String inputName)
      • promptNeeded

        public void promptNeeded()
      • promptNow

        public void promptNow()
      • getResourceAsString

        public String getResourceAsString​(org.pentaho.platform.api.engine.IActionSequenceResource resource)
      • getInitFailMessage

        public String getInitFailMessage()
      • createNewInstance

        public String createNewInstance​(boolean persisted,
                                        Map parameters,
                                        boolean forceImmediateWrite)
      • inputMissingError

        public void inputMissingError​(String paramName)
      • outputMissingError

        public void outputMissingError​(String paramName)
      • resourceMissingError

        public void resourceMissingError​(String paramName)
      • resourceComponentSettingError

        public void resourceComponentSettingError​(String paramName)
      • execute

        public int execute()
        Specified by:
        execute in interface org.pentaho.platform.api.engine.IComponent
      • getId

        public String getId()
        Specified by:
        getId in interface org.pentaho.platform.api.engine.IAuditable
      • getActionTitle

        public String getActionTitle()
      • getOutputContentItem

        protected org.pentaho.platform.api.repository.IContentItem getOutputContentItem​(String mimeType)
      • getOutputContentItem

        protected org.pentaho.platform.api.repository.IContentItem getOutputContentItem​(String outputName,
                                                                                        String mimeType)
      • setOutputValue

        protected void setOutputValue​(String outputName,
                                      Object value)
      • getDefaultOutputStream

        protected OutputStream getDefaultOutputStream​(String mimeType)
      • applyInputsToFormat

        protected String applyInputsToFormat​(String format)
      • getOutputItem

        protected org.pentaho.platform.api.engine.IActionParameter getOutputItem​(String outputName)
      • getSolutionName

        protected String getSolutionName()
      • getSolutionPath

        protected String getSolutionPath()
      • getInputParameter

        protected org.pentaho.platform.api.engine.IActionParameter getInputParameter​(String parameterName)
      • isPromptPending

        protected boolean isPromptPending()
      • setFeedbackMimeType

        protected void setFeedbackMimeType​(String mimeType)
      • setOutputMimeType

        protected void setOutputMimeType​(String mimeType)
      • getFeedbackOutputStream

        protected OutputStream getFeedbackOutputStream()
      • createFeedbackParameter

        protected void createFeedbackParameter​(org.pentaho.platform.api.engine.IActionParameter actionParam)
      • createFeedbackParameter

        protected void createFeedbackParameter​(org.pentaho.platform.api.engine.ISelectionMapper selMap,
                                               String fieldName,
                                               Object defaultValues)
      • createFeedbackParameter

        protected void createFeedbackParameter​(String fieldName,
                                               String displayName,
                                               String hint,
                                               String defaultValue,
                                               boolean visible)
      • createFeedbackParameter

        public void createFeedbackParameter​(String fieldName,
                                            String displayName,
                                            String hint,
                                            Object defaultValues,
                                            List values,
                                            Map dispNames,
                                            String displayStyle)
      • 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 interface org.pentaho.platform.api.engine.IComponent
      • getActionDefinition

        public org.pentaho.actionsequence.dom.IActionDefinition getActionDefinition()
        Specified by:
        getActionDefinition in interface org.pentaho.platform.api.engine.IComponent