org.pentaho.platform.engine.services.solution
Class SolutionEngine

java.lang.Object
  extended by org.pentaho.platform.engine.core.system.PentahoBase
      extended by org.pentaho.platform.engine.services.PentahoMessenger
          extended by org.pentaho.platform.engine.services.solution.SolutionEngine
All Implemented Interfaces:
Serializable, ILogger, IPentahoInitializer, ISolutionEngine

public class SolutionEngine
extends PentahoMessenger
implements ISolutionEngine, IPentahoInitializer

See Also:
Serialized Form

Field Summary
 
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.ISolutionEngine
RUNTIME_SOLUTION_NAME
 
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
SolutionEngine()
           
 
Method Summary
 IRuntimeContext execute(IRuntimeContext pRuntime, String solutionName, String sequencePath, String sequenceName, String processId, boolean async, boolean instanceEnds, Map parameterProviderMap, IOutputHandler outputHandler)
          Executes the action sequence specified
 IRuntimeContext execute(String actionSequenceXML, String sequenceName, String processId, boolean async, boolean instanceEnds, String instanceId, boolean isPersisted, Map parameterProviderMap, IOutputHandler outputHandler, IActionCompleteListener pListener, IPentahoUrlFactory urlFactory, List messages)
          Executes the in memory action sequence specified
 IRuntimeContext execute(String solutionName, String sequencePath, String sequenceName, String processId, boolean async, boolean instanceEnds, String instanceId, boolean isPersisted, Map parameterProviderMap, IOutputHandler outputHandler, IActionCompleteListener pListener, IPentahoUrlFactory urlFactory, List messages)
          Executes the action sequence specified in the manner described in the parameters
 IRuntimeContext getExecutionContext()
           
 org.apache.commons.logging.Log getLogger()
           
 int getStatus()
           
 void init(IPentahoSession pSession)
          Initialize the SolutionEngine.
 void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback callback)
           
 void setForcePrompt(boolean forcePrompt)
          Sets if the promp page should be forced
 void setlistener(IActionCompleteListener doneListener)
          Sets the action complete listener which will be called when the action is complete
 void setlistener(IExecutionListener execListener)
           
 void setParameterProvider(String name, IParameterProvider parameterProvider)
          Sets the source for input parameters.
 void setParameterXsl(String xsl)
          Sets the xsl file to be used to generate the parameter page for the current component.
 void setSession(IPentahoSession session)
          Sets the session in the solution engine
 
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, getLoggingLevel, getLogId, getObjectName, 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.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 

Constructor Detail

SolutionEngine

public SolutionEngine()
Method Detail

getLogger

public org.apache.commons.logging.Log getLogger()
Specified by:
getLogger in class PentahoBase

init

public void init(IPentahoSession pSession)
Description copied from interface: ISolutionEngine
Initialize the SolutionEngine. This method should be called immediately after object construction, and if solution engines are re-used among different IPentahoSessions to bind the solution engine to the session.

Specified by:
init in interface IPentahoInitializer
Specified by:
init in interface ISolutionEngine
Parameters:
pSession - the session context for this SolutionEngine

setParameterProvider

public void setParameterProvider(String name,
                                 IParameterProvider parameterProvider)
Description copied from interface: ISolutionEngine
Sets the source for input parameters.

Specified by:
setParameterProvider in interface ISolutionEngine
Parameters:
name - name to give to this provider
parameterProvider - instance of a provider
See Also:
org.pentaho.platform.api.engine.services.IParameterProvider

setlistener

public void setlistener(IActionCompleteListener doneListener)
Description copied from interface: ISolutionEngine
Sets the action complete listener which will be called when the action is complete

Specified by:
setlistener in interface ISolutionEngine
Parameters:
doneListener - Listener to call back when execution is complete.

setlistener

public void setlistener(IExecutionListener execListener)
Specified by:
setlistener in interface ISolutionEngine

setSession

public void setSession(IPentahoSession session)
Description copied from interface: ISolutionEngine
Sets the session in the solution engine

Specified by:
setSession in interface ISolutionEngine
Parameters:
session - The session for this execution

getStatus

public int getStatus()
Specified by:
getStatus in interface ISolutionEngine
Returns:
Gets the current status from this execution

getExecutionContext

public IRuntimeContext getExecutionContext()
Specified by:
getExecutionContext in interface ISolutionEngine
Returns:
the runtime context being used for this execution.

execute

public IRuntimeContext execute(String solutionName,
                               String sequencePath,
                               String sequenceName,
                               String processId,
                               boolean async,
                               boolean instanceEnds,
                               String instanceId,
                               boolean isPersisted,
                               Map parameterProviderMap,
                               IOutputHandler outputHandler,
                               IActionCompleteListener pListener,
                               IPentahoUrlFactory urlFactory,
                               List messages)
Description copied from interface: ISolutionEngine
Executes the action sequence specified in the manner described in the parameters

Specified by:
execute in interface ISolutionEngine
Parameters:
solutionName - the name at the root level of the solution path
sequencePath - the path relative to the solutionName that will lead to the requested action
sequenceName - name of the action sequence document
processId - id for the given action sequence document
async - synchronous(false) or asynchronous(true) execution (not currently used)
instanceId - id to be handed to the runtime repository
isPersisted - if true, store runtime data, otherwise do not
parameterProviderMap - group of ParameterProviders, sources for inout parameters
outputHandler - handler used to query for addition parameters
pListener - object notified on completion of action sequences
urlFactory - factory for building urls
messages - list into which debug, info, warning, and errors messages will be added
Returns:
IRuntimeContext the RuntimeContext associated with this action sequence execution
See Also:
IRuntimeContext

execute

public IRuntimeContext execute(String actionSequenceXML,
                               String sequenceName,
                               String processId,
                               boolean async,
                               boolean instanceEnds,
                               String instanceId,
                               boolean isPersisted,
                               Map parameterProviderMap,
                               IOutputHandler outputHandler,
                               IActionCompleteListener pListener,
                               IPentahoUrlFactory urlFactory,
                               List messages)
Description copied from interface: ISolutionEngine
Executes the in memory action sequence specified

Specified by:
execute in interface ISolutionEngine
Parameters:
actionSequenceXML - the in memory action sequence string
sequenceName - name of the action sequence
processId - id for the given process, typically a GUID or unique id for this execution
async - true if the execution should be asynchronous.
instanceEnds - currently true indicating that the process ends with this execution
parameterProviderMap - Map of parameter providers to use for the execution
outputHandler - The output handler for dealing with user feedback
Returns:
The runtime context for the execution
See Also:
IRuntimeContext, IParameterProvider, IActionSequence

execute

public IRuntimeContext execute(IRuntimeContext pRuntime,
                               String solutionName,
                               String sequencePath,
                               String sequenceName,
                               String processId,
                               boolean async,
                               boolean instanceEnds,
                               Map parameterProviderMap,
                               IOutputHandler outputHandler)
Description copied from interface: ISolutionEngine
Executes the action sequence specified

Specified by:
execute in interface ISolutionEngine
Parameters:
pRuntime - The runtime context for the execution
solutionName - Name of the solution
sequencePath - path to the solution
sequenceName - name of the action sequence
processId - id for the given process, typically a GUID or unique id for this execution
async - true if the execution should be asynchronous.
instanceEnds - currently true indicating that the process ends with this execution
parameterProviderMap - Map of parameter providers to use for the execution
outputHandler - The output handler for dealing with user feedback
Returns:
The runtime context for the execution
See Also:
IRuntimeContext, IParameterProvider, IActionSequence

setForcePrompt

public void setForcePrompt(boolean forcePrompt)
Description copied from interface: ISolutionEngine
Sets if the promp page should be forced

Specified by:
setForcePrompt in interface ISolutionEngine

setParameterXsl

public void setParameterXsl(String xsl)
Description copied from interface: ISolutionEngine
Sets the xsl file to be used to generate the parameter page for the current component. The parameter should be a full path from the solution root starting with a /, or it should be a path relative to the directory of the current action sequence.

Specified by:
setParameterXsl in interface ISolutionEngine
Parameters:
xsl - The name of the XSL file

setCreateFeedbackParameterCallback

public void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback callback)
Specified by:
setCreateFeedbackParameterCallback in interface ISolutionEngine