public void setInputStream( InputStream arg0 ) {
xactionDefInputStream = arg0;
}
public void execute() throws Exception {
IOutputHandler outputHandler = null;
if ( xactionResultsOutputStream instanceof RepositoryFileOutputStream ) {
outputHandler = new RepositoryFileOutputHandler( ( (RepositoryFileOutputStream) xactionResultsOutputStream ) );
} else {
outputHandler = new SimpleOutputHandler( xactionResultsOutputStream, false );
}
IRuntimeContext rt = null;
try {
ISolutionEngine solutionEngine = PentahoSystem.get( ISolutionEngine.class, null );
solutionEngine.setCreateFeedbackParameterCallback( null );
solutionEngine.setLoggingLevel( ILogger.DEBUG );
solutionEngine.setForcePrompt( false );
ArrayList messages = new ArrayList();
HashMap<String, Object> parameterProviders = new HashMap<String, Object>();
parameterProviders.put( IParameterProvider.SCOPE_REQUEST, new SimpleParameterProvider( xActionInputParams ) );
parameterProviders.put( IParameterProvider.SCOPE_SESSION, new PentahoSessionParameterProvider(
PentahoSessionHolder.getSession() ) );
String xactionPath = null;
if ( xactionDefInputStream instanceof RepositoryFileInputStream ) {
xactionPath = ( (RepositoryFileInputStream) xactionDefInputStream ).getFile().getPath();
}
rt =
solutionEngine.execute( xactionPath, this.getClass().getName(), false, true, null, true, parameterProviders,
outputHandler, null, null, messages );
if ( !outputHandler.contentDone() ) {
if ( ( rt != null ) && ( rt.getStatus() == IRuntimeContext.RUNTIME_STATUS_SUCCESS ) ) {
boolean isFlushed = false;
boolean isEmpty;
if ( xactionResultsOutputStream instanceof RepositoryFileOutputStream ) {
RepositoryFileOutputStream repositoryFileOutputStream =